Legal experts say they expect the Supreme Court to eventually weigh in on the issue, but are still uncertain which state will win the race to the court.

The federal government asked an appeals court Friday to stop Alabama officials from enforcing a strict immigration law that has already driven Hispanic students from public schools and migrant workers from towns, warning that it opens the door to discrimination against even legal residents.

The Department of Justice’s filing to the 11th U.S. Circuit Court of Appeals also said the law, considered by many to be the most stringent immigration measure in the country, could cause considerable fallout as immigrants flee to other states or their native countries.

A coalition of advocacy groups also filed a separate appeal Friday that claims the law has thrown Alabama into “chaos” and left some Hispanics too afraid to go to their jobs and reluctant to send their kids to school.

The court signaled in an order Friday that it wouldn’t decide whether to halt the law until it reviews more arguments from both sides next week. The state must file a brief by Tuesday, and the government must respond by Wednesday. After that, the court could decide whether to intervene by issuing a preliminary injunction.

In the meantime, Alabama Gov. Robert Bentley said he intends to continue enforcing the hotly disputed law, which allows authorities to detain people suspected of being in the country illegally and lets officials check the immigration status of students in public schools.

Those measures took effect last week after a federal judge upheld them, and they help make the Alabama law stricter than similar laws enacted in Arizona, Utah, Indiana and Georgia. Federal judges in those states have blocked all or parts of those measures.

Justice Department attorneys outlined several problems they have with the Alabama overhaul.

They worry the law is likely to expose legal residents “to new difficulties in routine dealings” and could force federal authorities to deal with low-risk immigrants rather than the most dangerous criminals. And, they say, the attempt to drive illegal immigrants “off the grid” could disrupt both diplomatic relationships and national policy.

“Other states and their citizens are poorly served by the Alabama policy, which seeks to drive aliens from Alabama rather than achieve cooperation with the federal government to resolve a national problem,” the filing said.

Immigration has become a hot-button issue in Alabama over the past decade as the state’s Hispanic population has grown by 145 percent to about 185,600. U.S. Census figures show the group represents about 4 percent of the state population, but some counties in north Alabama have large Spanish-speaking communities and schools where most of the students are Hispanic.

State Republicans have long sought to clamp down on illegal immigration and passed the law earlier this year after gaining control of the Legislature for the first time since Reconstruction. Bentley soon signed the measure, saying it was crucial to protect the jobs of legal residents amid the tough economy.

Alabama House Speaker Mike Hubbard said the state was forced to act because the federal government ignored its responsibility to enforce immigration law.

“In Alabama we believe in obedience to law because it promotes fairness and protects the rights of everybody,” said Hubbard, a Republican. “That’s why instead of just talking about it, we took action to ensure nobody is allowed to cheat the system and ignore our laws.”

The measure has had an immediate impact.