COLUMBIA -- A federal judge on Thursday blocked several provisions of South Carolina's tough new immigration law from taking effect New Year's Day, including a requirement for law officers to check the immigration status of people they pull over if they suspect they are in the country illegally.

U.S. District Judge Richard Gergel's ruling also blocked sections making it a state crime not to carry immigration paperwork or for illegal immigrants to transport or house themselves.

"While the Court does not doubt the good faith of the South Carolina General Assembly in attempting to address the immigration issue, the Constitution of the United States and the (Immigration and Nationality Act) have placed the policy-making role regarding immigration in the hands of the national government," the judge wrote. "It is clear to the Court that Congress did not intend to allow the state any further role beyond arresting persons allegedly harboring or transporting unlawfully present persons."

The federal government sued South Carolina earlier this year over, challenging the constitutionality of the law set to take effect Jan. 1.

Both the federal government and civil rights groups including the American Civil Liberties Union wanted to block the measure on checking the status of suspects pulled over by police. The questioning must follow a stop or arrest for something else, and the measure bars officers from holding someone solely on that suspicion. Opponents said it would encourage racial profiling.

During a hearing in Charleston Monday, the judge repeatedly referred to the provision as the "traffic dragnet" and he wrote in his ruling that it would ultimately ensnare far more "low priority targets" than was necessary and end up complicating federal immigration enforcement efforts.

Earlier this week, Gergel also denied the state's request that the law proceed as scheduled and that he suspend all court hearings on the case until the U.S. Supreme Court rules on a challenge to Arizona's similar law.

A spokesman for South Carolina Attorney General Alan Wilson said other parts of the law would go into effect Jan. 1. State prosecutors have said the nation's high court will likely rule in six months or less.

Gergel has said blocking the whole law would have knocked out sections that are clearly lawful, like a requirement that all businesses check their new hires' legal status through a federal online system. Businesses that knowingly violate the law could have their operating licenses revoked.

In the 42-page ruling, Gergel cast doubt on the state's contention that the new law was intended to help federal authorities control immigration issues.

"Defendants contend that Act 69 is nothing more than an effort to cooperate with the federal government in the pursuit of the common goal of immigration enforcement," Gergel wrote. "Since the State of South Carolina has now been sued by the national government over its adoption of Act 69, it begs the question of the meaning of the word 'cooperate.'"