A federal appeals court just made it more difficult for travelers to sue over claims that they were mistreated by a Transportation Security Administration employee at an airport checkpoint.

The United States Court of Appeals for the Third Circuit ruled on Wednesday that T.S.A. agents are administrative employees of the federal government and not law enforcement officers. They are therefore immune from being sued for misconduct in civil cases.

“For most people,” the court said in its 2-to-1 ruling, “T.S.A. screenings are an unavoidable feature of flying, and they may involve thorough searches of not only the belongings of passengers but also their physical persons.” But the court added that while it was “sympathetic” to travelers’ concerns about aggressive or overzealous screeners, liability was limited by Congress to law enforcement officers. T.S.A. agents, the majority said, “do not meet that definition.”

In his dissent, Judge Thomas Ambro argued that by equating “T.S.A. searches to routine administrative inspections, my colleagues preclude victims of T.S.A. abuses from obtaining any meaningful remedy.”