A homeless man can continue his legal battle against the city of Los Angeles by claiming his constitutional rights were violated when his pet pigeons were taken and euthanized, a federal court ruled Tuesday.

The three-judge panel of the U.S. 9th Circuit Court of Appeals, the most liberal appeals court in America, gave Martino Recchia another chance to sue after a lower court ruled in favor of the city.

Recchia was living on the streets of L.A. in late 2011 with his 20 pet birds when an animal control officer confronted him after receiving complaints, according to court records. The birds – which included 18 pigeons, a crow, and seagull – were kept in "in 12 to 14 cardboard boxes and cages, which were covered with blankets and towels."

After Recchia agreed to an inspection, the animal control officer noted that while all the birds had food and water, they were in areas too small to be able to fly around, the newspaper lining the floors was wet and the boxes were covered with feces, court records stated.

Many of the pigeons were noted to be in "dire physical condition," with one bird suffering from a baseball-sized tumor and several with deformities, but court records also noted that eight of the pigeons appeared to be healthy.

Recchia told officers at the time he rescued many of the birds and kept them "in the same or better condition than that in which he had found them."

CALIFORNIA HIGHWAY WORKERS FACE 'BUCKETS OF HUMAN FECES,' NEEDLES AS HOMELESS CRISIS WORSENS

Authorities ended up seizing the birds after Recchia was unable to give information about a friend's home that could hold the birds, and told him he had 10 days to request a hearing. But before that hearing date, a city veterinarian determined that while the crow and seagull should be sent to wildlife rescue organizations, all of the pigeons needed to be euthanized because it was likely "even those birds without outward signs of illness carried pathogens."

The ruling on Tuesday agreed with a lower court ruling that many of Recchia's claims had to be rejected.

Judge Ronald M. Gould, a Clinton appointee, noted that there is "a strong general governmental interest in being able to seize animals that may be in imminent danger of harm due to their living conditions, may carry pathogens harmful to humans or other animals, or may otherwise threaten public safety without first needing to have a hearing on the subject."

Recchia's lawsuit regarding the seizure of the healthy-looking birds without a warrant can still go forward, because as Gould noted, "there is a genuine factual dispute about whether the healthy-looking birds posed any meaningful risk to other birds or humans at the time they were seized."