SAN FRANCISCO (AP) — Law enforcement must provide a valid reason to hold people's vehicles and cannot automatically impound them for a set period, a federal appeals court said Wednesday.

The unanimous ruling by a three-judge panel of the 9th U.S. Circuit Court of Appeals struck down a California law that requires police to hold impounded vehicles for 30 days.

Judge Alex Kozinski, writing for the panel, said the law violates the Fourth Amendment prohibition against unreasonable seizures.

"A seizure is justified under the Fourth Amendment only to the extent that the government's justification holds force," he said. "Thereafter, the government must cease the seizure or secure a new justification."

The decision revived a lawsuit against Los Angeles by a woman whose car was held by police for 30 days. The Los Angeles City Attorney's Office did not immediately have comment.

Lamya Brewster loaned her vehicle to Yonnie Percy, her brother-in-law, according to the 9th Circuit ruling. Los Angeles police stopped Percy and seized the vehicle when they learned Percy had a suspended driver's license.

The 9th Circuit said there was agreement that the initial seizure did not pose any problems under an exception to the Fourth Amendment that allows police to impound vehicles that jeopardize public safety.

But the court said police provided no new justification to continue holding the vehicle after Brewster showed up with proof of ownership and a valid driver's license three days later.

A lower court had thrown Percy's lawsuit out, finding that the 30-day impoundment period was aimed at deterring unlicensed drivers or drivers with suspended licenses from driving and was a lawful penalty.