If the JFK search was voluntary, the officers did nothing legally wrong in this case. But on the legal point, as far as I can tell, there is no exception to the Fourth Amendment that would allow a demand for ID.

A searched aimed a specific individual might be a different matter. Under the Fourth Amendment, a “reasonable suspicion” that a person is involved is a fugitive, or committing a crime, or unlawfully present is enough to permit law enforcement to approach, and perhaps eventually search. That requirement—“reasonable suspicion”—is the protection Americans have against warrantless searches and seizures. Police can often detain (“seize”) and search without a warrant—if they have seen something that would lead a reasonable officer to think there’s a violation of law or evidence of crime to be found.

What they can’t do, as a general rule, is just stop or search everyone in a given area on the chance that one of them will be a criminal. The Supreme Court wrote in 2001 of its longstanding “general prohibition against nonconsensual, warrantless, and suspicionless searches.” In the case of the JFK search, CBP said that the object of the ID check was a specific named individual. (This individual was not on the flight.)

If so, why would it be “reasonable” to check everyone on the plane—a population that was probably half male and half female, ranged in age from to 8 months to 80 years, and was ethnically diverse? Could they really not know the individual’s size, sex, age, and ethnicity? If they did, but thought it was more convenient to require everyone to show papers, they were violating the Fourth Amendment—convenience is not a “special circumstance” permitting a warrantless search.

And note that the search was, according to CBP, for a documented alien who had been ordered deported. Deportation is a civil, not a criminal, proceeding. It’s hard to understand why a civil order, however important, justifies an exception to the Fourth Amendment.

An international airport, a number of correspondents pointed out, is considered in Fourth Amendment law to be the “functional equivalent of the border,” even if it is located hundreds of miles from the physical border. Officers can of course check passports and identities at a border crossing, and search any possessions of travelers, even without reasonable suspicion.

The “functional equivalent” doctrine was unveiled as an aside in a 1972 Supreme Court case called Almeida-Sanchez v. United States: “a search of the passengers and cargo of an airplane arriving at a St. Louis airport after a nonstop flight from Mexico City would clearly be the functional equivalent of a border search.”

The Supreme Court didn’t explain exactly what the words mean; but as far as I can tell, every circuit that has considered it has concluded that (as the Fourth Circuit held in a case called United States v. Laughman), “there cannot be an Almeida-Sanchez border search without some degree of probability that the vessel has crossed a border; i.e., the officials must possess some articulable facts tending to show that the vessel has recently crossed an international border.” If a passenger has just gotten off an international flight, and hasn’t gotten into the regular population yet, then a warrantless “border search” is fine; ditto when a passenger is boarding a flight out of the U.S.