PHOENIX (AP) -- A federal judge stepped into the fight over Arizona's immigration law at the last minute Wednesday, blocking the heart of the measure and defusing a confrontation between police and thousands of activists that had been building for months.
Coming just hours before the law was to take effect, the ruling isn't the end.
It sets up a lengthy legal battle that could end up before the Supreme Court - ensuring that a law that reignited the immigration debate, inspired similar measures nationwide, created fodder for political campaigns and raised tensions with Mexico will stay in the spotlight.
Protesters who gathered at the state Capitol and outside the U.S. Embassy in Mexico City cheered when they heard the news. The governor, the law's authors and anti-illegal immigration groups vowed to fight on.
"It's a temporary bump in the road," Gov. Jan Brewer said.
The key issue before U.S. District Judge Susan Bolton in the case is as old as the nation itself: Does federal law trump state law? She indicated in her ruling that the federal government's case has a good chance at succeeding.
The Clinton appointee said the controversial sections should be put on hold until the courts resolve the issues, including parts that required officers to check a person's immigration status while enforcing other laws.
In her temporary injunction, Boltondelayed provisions that required immigrants to carry their papers and banned illegal immigrants from soliciting employment in public places - a move aimed at day laborers.
The judge also blocked officers from making warrantless arrests of suspected illegal immigrants for crimes that can lead to deportation.
"Requiring Arizona law enforcement officials and agencies to determine the immigration status of every person who is arrested burdens lawfully present aliens because their liberty will be restricted while their status is checked," Bolton wrote.
The ruling came just as police were making last-minute preparations to begin enforcement of the law and protesters, many of whom said they would not bring identification, were planning large demonstrations against the measure.
At least one group had planned to block access to federal offices, daring officers to ask them about their immigration status.
"I knew the judge would say that part of the law was just not right," said Gisela Diaz, 50, from Mexico City, who came to Arizona on a since-expired tourist visa in 1989 and who waited with her family early Wednesday at the Mexican Consulate to get advice about the law.
"It's the part we were worried about. This is a big relief for us," she said.
At a Home Depot in west Phoenix, where day-laborers gather to look for work, Carlos Gutierrez said he was elated when a stranger drove by and yelled the news: "They threw out the law! You guys can work!"
"I felt good inside" said the 32-year-old illegal immigrant, who came here six years ago from Sonora, Mexico, and supports his wife and three children. "Now there's a way to stay here with less problems."
Opponents argued the law will lead to racial profiling, conflict with federal immigration law and distract local police from fighting more serious crimes. The U.S. Justice Department, civil rights groups and a Phoenix police officer asked for Wednesday's injunction.
Lawyers for the state contend the law was a constitutionally sound attempt by Arizona to assist federal immigration agents and lessen border woes, such as the heavy costs for educating, jailing and providing health care for illegal immigrants.
They said Arizona shouldn't have to suffer from a broken immigration system when it has 15,000 officers who can arrest illegal immigrants.
In her ruling, Bolton said the interests of Arizona, the busiest U.S. gateway for illegal immigrants, match those of the federal government. But, she wrote, that the federal government must take the lead on deciding how to enforce immigration laws.
The core of the government's case is that federal immigration law trumps state law - an issue known as "pre-emption" in legal circles. In her ruling, Bolton pointed out five portions of the law where she believed the federal government would likely succeed on its claims.
Justice Department spokeswoman Hannah August said the agency understands the frustration of Arizona residents with the immigration system, but added that a patchwork of state and local policies would seriously disrupt federal immigration enforcement.
Federal authorities have argued that letting the Arizona law stand would create a patchwork of immigration laws nationwide that would needlessly complicate foreign relations. They said the law is disrupting U.S. relations with Mexico and other countries.
About 100 protesters in Mexico City who had gathered in front of the U.S. Embassy broke into cheers when they learned of Bolton's ruling. They had been monitoring the news on a laptop computer.
"Migrants, hang on, the people are rising up!" they chanted.
Mexico's Foreign Secretary Patricia Espinoza called the ruling "a first step in the right direction" and said staff at the five Mexican consulates in Arizona will work extra hours in coming weeks to educate migrants about the law.
"None of this is very surprising," said Kevin R. Johnson, an immigration expert and the law school dean at University of California at Davis. "This is all very much within the constitutional mainstream."
The federal government has exclusive powers over immigration to ensure a uniform national policy that aids in commerce and relations with other countries, Johnson said.
A century ago, differing policies among states led to problems that prompted the federal government to adopt a comprehensive immigration policy for the country, Johnson said.
Supporters took solace that the judge kept portions of the law intact, including a section that bars local governments from limiting enforcement of federal immigration laws. Those jurisdictions are commonly known as "sanctuary cities."
"Striking down these sanctuary city policies has always been the No. 1 priority," said Republican Sen. Russell Pearce, the law's chief author.
The remaining provisions, many of them revisions to an Arizona immigration statute, will take effect at 12:01 a.m. Thursday.
The state can appeal Bolton's ruling to the 9th U.S. Circuit Court of Appeals in San Francisco. Whatever way that court rules, Bolton will eventually hold a trial and issue a final ruling.
Wednesday's decision was seen as a defeat for Brewer, who is running for another term in November and has seen her political fortunes rise because of the law's popularity among conservatives.
Her opponent, state Attorney General Terry Goddard, pounced.
"Jan Brewer played politics with immigration, and she lost," the Democrat said. "It is time to look beyond election-year grandstanding and begin to repair the damage to Arizona's image and economy."
Some residents in Phoenix agreed.
"A lot of people don't understand the connection between, 'Yes, we have a problem with illegal immigration' and 'We need immigration reform,' which is not just asking people for their papers," said Kimber Lanning, a 43-year-old Phoenix music store owner.
"It was never a solution to begin with."