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.

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.

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.

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