Georgia's became the latest in a string of state laws that have been at least temporarily stopped by legal challenges. All or parts of similar laws in Arizona, Utah and Indiana have been blocked by federal judges.
Judge Thomas Thrash also granted a request from civil liberties groups to block a part of Georgia's law that penalizes people who knowingly and willingly transport or harbor illegal immigrants while committing another crime.
The judge was especially critical of that provision, blasting the state's assertion that federal immigration enforcement is "passive." Thrash said that federal immigration officers remove more than 900 foreigners from the country on an average day.
He wrote that the state measure would overstep enforcement boundaries established by federal law. Thrash said that there are thousands of illegal immigrants in Georgia because of the "insatiable demand in decades gone by for cheap labor" in agriculture and construction. But he said the federal government gives priority to prosecuting and removing illegal immigrants who have committed crimes.
Thrash did toss parts of the lawsuit. The civil liberties groups had argued that the law allows unreasonable seizures; blocks a constitutional right to travel; and restricts access to government services on the basis of national origin. The judge dismissed those claims, along with allegations the measure violates property rights and the state constitution.
Nonetheless, the groups hailed the ruling.
"This is a victory that matches the trend nationally. It should send a really strong signal to other states considering such laws," said Karen Tumlin, a lawyer for the National Immigration Law Center.
Georgia Attorney General Sam Olens said in a statement his office plans to appeal the court's ruling.
The judge also was concerned about the wider implications of the law on trade and diplomatic relations, which were laid out by Mexican officials in documents.
"The conflict is not a purely speculative and indirect impact on immigration. It is direct and immediate," he wrote.
The federal judge accused the state of "gross hypocrisy" in its argument that Georgia's crackdown would prevent the exploitation of illegal immigrants: "The apparent legislative intent is to create such a climate of hostility, fear, mistrust and insecurity that all illegal aliens will leave Georgia."
Brian Robinson, a spokesman for Georgia Gov. Nathan Deal, said: "Curiously, the court writes 'all illegal aliens will leave Georgia' if the law is enforced, as if it is appalled at the thought of people attaining visas before coming to our nation."