Passengers arriving at JFK Airport on a flight from Mexico were able to breeze through a bustling terminal and out the door without going through Customs — the second time it’s happened at the American Airlines terminal in two months, sources said Monday.

A spokesman for US Customs and Border Protection blamed the airline for failing to ensure that passengers on Flight 1223 from Cancun had their passports checked when the Jan. 18 flight landed — an oversight that could have let terrorists waltz into the country undetected.

“Due to an airline error, some of the international passengers were inadvertently directed to exit through a domestic gate before being processed by CBP,” spokesman Anthony Bucci said in a statement.

“CBP is working with airline personnel to ensure that all misdirected passengers satisfy CBP’s processing requirements. CBP, Terminal 8 airline security personnel, and the airport authority are conducting an investigation regarding this incident and will implement measures to prevent similar occurrences in the future.”

American Airlines admitted the potentially dangerous mistake.

“We take the safety and security of our customers, employees and operation very seriously,” the company said in a statement. “Some passengers on Flight 1223 did not complete immigration and customs process upon arrival when they were inadvertently directed to the domestic terminal.”

It was unclear how many passengers were on the flight and how many skirted the screenings.

The same thing happened with another American Airlines flight from Cancun in November, only days after ISIS jihadis threatened a terror attack on the Big Apple in a video.

Airline and security officials said then they were reviewing procedures and would enact reforms to make sure the incident wasn’t repeated.

Neither American nor Customs immediately responded to questions about what those reforms were or why the foul-up happened again.

Meanwhile, the two incidents weren’t the only security scares at JFK in the past year.
In December, a mystery man was spotted by airport workers trespassing near a runway — and then threatening a cargo worker to keep his mouth shut.

Security was alerted on Dec. 13 after a Lufthansa airline worker said he saw the man walking near a taxiway without required identification.

The man replied, “You better not say s–t,” Port Authority cops said.

In April, a Harlem man abandoned a stolen truck at JFK and started shouting, “I will be famous!” as he dashed past a TSA screening checkpoint and nearly made it onto a passenger jet.

This story originally appeared in the New York Post.