PHILADELPHIA (AP) – A U.S. appeals court says travelers can sue the government over mistreatment by federal airport screeners because the agents can act like law enforcement officers, including when they conduct invasive searches.

The 9-4 decision Friday by the 3rd U.S. Circuit Court of Appeals overturned earlier rulings and is a setback for the Transportation Security Administration and its screeners.

READ MORE: Police: Botched Carjacking Ends In Crash That Kills 3 Teens

The government is generally immune from lawsuits, but a federal law lets people sue over the actions of officers who can conduct searches and arrest people.

READ MORE: Pennsylvania Adopts CDC's Relaxed Mask-Wearing Guidelines For Those Fully Vaccinated

A district court and a three-judge panel of the same appeals court said TSA officers are just screeners who inspect passengers and bags. The full appeals court says, however, that screeners aren’t entitled to immunity from lawsuits because they perform searches for violations of federal law.

MORE NEWS: Christian Ross Facing Arson Charges In Massive Fire That Destroyed Historic South Side Building

(Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)