In recent years if you were an illegal immigrant in L.A. — and there are many of you — you faced losing your car for at least 30 days if you were stopped by the LAPD.

Under the urging of then-Mayor Antonio Villaraigosa, the department last year changed that policy and said you could pretty much keep your car if you hadn't done anything else wrong. But the policy, called Special Order 7, was challenged by the police union and a citizen, and today a local judge ruled against the LAPD:

L.A. Superior Court Judge Terry Green said that the LAPD's policy was inconsistent with state law, which allows officers to enforce the 30-day impounds.

The question appears to be whether the department can direct its cops as to how and when to use state rules in such a matter.

The ACLU, which is defending the city's position in court, says the department can indeed establish guidelines for officers to use on the street. But the union says the policy ties the hands of cops when it comes to enforcing California law — which says they must impound.

(Interestingly, the City Attorney's office, which is tasked with defending the policy, had no comment today, a spokesman told the Weekly.)

Of course, impounding cars in L.A. had become a racket.

Immigrants' advocates have argued that, especially in this town, nabbing illegals' cars for 30 days was a cash cow: In many cases the immigrants wouldn't have the wherewithal to pay the $1,000-plus in fines and storage to get their cars out of the yards and essentially had to give them up to be sold.

The undocumented, an integral part of our society, from dish washers to nannies, auto mechanics to cooks, can't get drivers licenses in California, period.

Then-Gov. Arnold Schwarzenegger refused to sign a law that would have reinstated the policy to make our streets safer by regulating everyone on the road.

Representing the citizen plaintiff in this latest battle is anti-illegal-immigrant group Judicial Watch.

The ACLU will appeal the ruling, staff attorney Michael Kaufman told the Weekly.

The judge will consider placing a stay on his ruling until the appeal is adjudicated, Kaufman said, meaning the LAPD no-tow policy could remain in effect for as long as a year while the parties duke it out.

But if the judge's ruling holds, Kaufman says, it could affect other police interpretations of how to enforce state law.

“This has the potential to upset many LAPD policies,” he said.

[Added at 3:40 p.m.]: L.A. Police Protective League president issued this statement:

We are pleased with the ruling today,” said Tyler Izen, President of the Los Angeles Police Protective League. “LAPD officers were caught in the middle of a legal controversy over whether they must impound vehicles driven by unlicensed drivers as required by the State Vehicle Code or follow LAPD Special Order No. 7 that preempted uniform enforcement of the statewide impound regulations. The decision to litigate was not taken lightly, and it was not a position on immigration policy or the status of undocumented immigrants in this country. The LAPPL felt strongly that it was unreasonable and unacceptable to place our membership in this position, and that public safety suffered because of this Special Order. We hope today's ruling will settle this controversy.

Send feedback and tips to the author. Follow Dennis Romero on Twitter at @dennisjromero. Follow LA Weekly News on Twitter at @laweeklynews.

Advertising disclosure: We may receive compensation for some of the links in our stories. Thank you for supporting LA Weekly and our advertisers.