A federal judge in Arizona has blocked key parts of the state's strict immigration law a day before it was due to take effect.
The judge blocked a requirement that police check the immigration status of criminal suspects whom they had stopped while enforcing other laws.
The federal government argues the law usurped its authority over immigration.
Among the other parts of the law blocked was a section making it a crime not to carry immigration papers.
The Republican-controlled Arizona legislature passed the law in April amid fears of rising crime caused by illegal aliens and complaints the federal government had failed to act on the matter.
The US justice department hailed the ruling, while acknowledging "the frustration of Arizonans with the broken immigration system".
"A patchwork of state and local policies would seriously disrupt federal immigration enforcement and would ultimately be counterproductive," spokeswoman Hannah August said in a statement.
"We will continue to work toward smarter and more effective enforcement of our laws while pressing for a comprehensive approach that provides true security and strengthens accountability and responsibility in our immigration system at the national level."