The Taxi and Limousine Commission has been unconstitutionally seizing thousands of cars a year from city streets, a federal judge found late Wednesday.

The agency seizes vehicles it believes are illegal cabs -- as well as licensed cars, like Uber's black cars, accused of picking up an illegal hail.

Southern District Judge Valerie Caproni ruled that the agency violated the Fourth Amendment right of drivers to be secure from unreasonable seizures -- and the 14th Amendment by depriving them of property without due process of law, court papers show.

Five people sued TLC Commissioner Meera Joshi, Deputy Commissioner for Enforcement Raymond Scanlon and the City of New York last fall after their cars were seized.

The city argued that it could seize the drivers' cars without a warrant because they were a threat to public safety and instruments of criminality.

The judge ruled that the cars are not contraband, like an unregistered hand grenade, because the TLC returns them to the owner after a fine is paid, court papers say. The cars are also not instruments of a crime because illegally operating a car is a violation the TLC does not criminally prosecute. 

No "federal court has ever upheld the warrantless seizure of private property in order to ensure payment of a fine," the judge said.

The plaintiff's lawyer, Daniel Ackman, said the ruling was significant. 

"We, of course, thought when we brought this suit that the TLC's actions affecting thousands of New Yorkers were clearly unconstitutional and we are very gratified with Judge Caproni's ruling," Ackman said.

The city's Law Department spokesman, Nick Paolucci, said the city is " reviewing the decision and considering our options."

The TLC seizes about 8,000 cars a year, according to court papers. 

The agency's seizures have been controversial. The TLC has said its goal is to protect the public from unlicensed drivers, who often drive in uninsured cars and don't undergo background checks. But the agency has been accused by drivers of seizing the cars of innocent people, such as people dropping off a friend at the airport. TLC enforcement officers also said last year they were under a lot of pressure from management to seize a high number of cars, regardless of whether it was a good case, and that that hasn't changed.

A Pennsylvania limousine driver, for instance, sued the city for losing his job and facing eviction after an undercover TLC officer seized his car after posing as a distraught traveler and begging him to take her to LaGuardia Airport.

When the limo was seized, the driver had to sleep on the floor of the airport for two days until a co-worker could pick him up -- and was then fired from his job.

The TLC this year also has begun seizing licensed cars, such as Uber cars that pick up an illegal hail off the street, rather than through the app.

 The TLC said the agency would not seize cars while it considered its next steps. "We have redirected our enforcement resources to issue appropriate summonses to vehicles and drivers in violation of city law and the TLC's rules," said spokesman Allan Fromberg.

 "Public safety is the TLC's top priority, and we will continue to use every resource available to us to protect the walking, riding and driving public."