A federal judge today upheld a controversial part of the state’s immigration law allowing police officers to check the status of offenders stopped for other violations.

But that’s about the only change that U.S. District Judge Richard Gergel made today to his earlier December 2011 order blocking much of the state’s tough new immigration law.

S.C. Attorney General Alan Wilson said Gergel’s ruling is “a significant victory” that “means police officers and sheriff’s deputies now have an important tool to assist them in doing their job and for protecting South Carolinians.”

But Gergel noted officers may not detain someone solely to check their legal status. It can take about 81 minutes to run an immigration inquiry, according to a S.C. Law Enforcement Support Center affidavit, so it’s possible officers might release some people before that inquiry is done.

Gergel’s order noted his decision could be challenged “based upon subsequent factual and legal developments” and that those challenging the immigration law can track how this new enforcement is unfolding on the streets.

Read more in tomorrow’s Post and Courier.