Updated

A judge this week ruled this week that Texas can no longer deny driver's licenses to legal immigrants with temporary visas and must issue standard licenses instead of non-standard ones approved by a state panel three years ago.

Judge Orlinda Naranjo said in a ruling Wednesday that the Texas Department of Public Safety exceeded its legal authority when it adopted a policy in 2008 as part of a crackdown on identity theft and fraud that requires immigrants applying for driver's licenses to prove they're in the country legally.

Gov. Rick Perry, a popular choice among Republicans looking for a 2012 GOP presidential contender, supported the policy that was a blueprint for a new law that is set to take effect at the end of this September. Under the law, all legal immigrants with visas authorized for less than one year or scheduled to expire in less than six months are still entitled to standard-issued driver's licenses.

"The governor continues to support requiring driver's license applicants to prove they are in the country legally before being issued a license," Perry spokeswoman Lucy Nashed said in an email to FoxNews.com.

The debate over driving privileges for illegal immigrants has raged across the country with most states prohibiting it but others considering a two-tiered licensing system. But driving privileges for legal immigrants is more standard fare in the states.

In Texas, the ruling is a victory for immigrant rights groups who said that thousands were denied standard-issued licenses even though they had valid immigration documents issued by the federal government.

"The unlawful DPS attempt to deny licenses to immigrants violated our national tradition and aspiration, so we welcome the court's wise ruling," said Thomas Saenz, president of the Mexican American Legal Defense and Educational Fund (MALDEF), a Latino civil rights group.

MALDEF sued the state on behalf of six immigrants and a landscaping business that employs foreign workers under the federal H-2B visa program. That program allows companies to hire temporary foreign workers after certifying that they can find no American workers to take the jobs.

"We are very pleased that the court halted DPS from implementing its own arbitrary, misguided policies that denied licenses to hardworking immigrants living in the United States with permission," said David Hinojosa, MALDEF Southwest Regional Counsel and lead attorney in the case.

"These irrational policies have not only affected those immigrants and their families, causing them to suffer from discrimination, but also impacted hundreds of Texas businesses who legally employ immigrants, and we are glad to put an end to the senseless action."

A DPS spokesman declined to comment. The state is appealing the ruling and DPS can continue its policy until the new law takes effect.