The American Civil Liberties Union filed a federal lawsuit this week over the handling of a domestic Delta Air Lines flight by U.S. Customs and Border Protection agents.

The ACLU and law firm Covington & Burling filed the lawsuit against U.S. Homeland Security, Customs and Border Protection (CBP) and Immigration and Customs Enforcement officials in U.S. District Court in the Eastern district of New York. The complaint was filed on behalf of passengers on the Delta flight from San Francisco that arrived at New York's John F. Kennedy International Airport on Feb. 22, 2017.

The lawsuit alleges that "the flight crew announced that all passengers would have to show identification documents to deplane" and that CBP "stopped and searched every passenger" on the flight.

Delta declined to comment. CBP said it does not comment on pending litigation. "However, lack of comment should not be construed as agreement or stipulation with any of the allegations," according to the agency. "In DHS's homeland security mission, our trained law enforcement professionals adhere to the Department's mission, uphold our laws while continuing to provide our nation with safety and security."

According to the lawsuit, many passengers "wondered aloud about the purpose of the demand for documents, who the officers were, and why all passengers would be required to show such documents after a domestic flight." Some passengers posted on social media about the incident.

"This is a serious and illegal erosion of our basic civil liberties," ACLU deputy legal director Cecilia Wang said in a written statement."

CBP said in a public statement the day after the incident that it was contacted by ICE to help locate an individual "possibly aboard" the Delta flight, who was ordered removed by an immigration judge, according to the lawsuit.

"To assist our law enforcement partners, two CBP officers requested identification from those on the flight in order to help identify the individual," the CBP statement said, according to the lawsuit. "The individual was determined not to be on the flight."

The ACLU alleges that the CBP agents acting at the behest of ICE "violated the passengers' rights against unreasonable search and seizure under the Fourth Amendment." The lawsuit says the CBP officers have border search authority, but a document on its search authority does not provide authorization to search passengers arriving on domestic flights.

The lawsuit seeks a permanent injunction barring such checks in the future, as well as attorneys' fees.

— Stay up to date on the latest news on Atlanta airline travel by following  Atlanta Airport News Now  on Facebook.

MORE:

Customs testing facial comparison technology at Hartsfield-Jackson

Travel industry to monitor effects of Trump's new travel ban U.S. Customs and Border Protection agents' actions dealing with passengers getting off a Delta flight earlier this year has prompted an ACLU lawsuit.