SAN FRANCISCO —A federal appeals court on Thursday struck down a 31-year-old Los Angeles law that bars people from living in parked vehicles, saying the vaguely written statute discriminates against the homeless and poor.

The ruling by a three-judge panel of the 9th U.S. Circuit Court of Appeals involved a 1983 law that prohibits the use of a vehicle “as living quarters either overnight, day-by-day, or otherwise.”

The court said the law was unconstitutional because its ambiguous wording does not make clear what conduct would constitute a violation.

The decision came in a case brought on behalf of four people who were cited and arrested in the Venice area by Los Angeles police officers.

The officers were part of an LAPD homelessness task force charged with enforcing the ordinance in response from community complaints about people living in their cars.