A JetBlue airliner, about to take off from JFK on...

A JetBlue pilot accidentally reported that his plane was being hijacked at JFK, triggering a massive response of cops and firefighters who surrounded the craft on the tarmac, officials said.

The pilot of Flight 1623, bound for Los Angeles, tried to punch in the code alerting JFK’s tower that the craft’s radio wasn’t working – but inadvertently hit keys that signaled a hijacking, law enforcement sources said.

So without verbal contact with Flight 1623 and the manually entered code for a hijacking, authorities at JFK had no choice but to assume the worst.

Port Authority police, its Emergency Services Unit, K-9 units, firefighters and ambulances all rushed to the scene.

“That brought everyone and their mother out to the tarmac,” a law enforcement source said. “Most people (cops and firefighters on the scene) have never responded to a hijacking, other than in training.”

The incident caused a ripple effect of delays in landings and departures as first responders rushed on to the runway.

“The aircraft was inspected and cleared with no security threat,” Port Authority spokeswoman Lenis Rodrigues said.

Flight 1623, with 158 people on board, was scheduled to leave at 7:30 p.m. and land at 10:52 p.m. at LAX. It finally took off at 11:23 p.m. and was expected to touch down at 2:28 a.m. in Los Angeles.

The flight was expected to take off later Tuesday night.

JetBlue spokeswoman Paula Acevedo declined to answer questions about the communications snafu – but did call it a “false alarm.”

“Shortly before departure, Flight 1623 from New York JFK to Los Angeles experienced a radio issue impacting the crew’s ability to communicate and a false alarm was sent to JFK tower,” she said in a statement.

“While communication was reestablished via alternate channels, authorities responded in an abundance of caution. The aircraft was cleared and returned to the gate for inspection.”

Passenger Tony Schwartz tweeted: “I am on a JetBlue flight at JFK that lost its communications. Created a security crisis. 10 heavily armed cops boarded plane and just left. After 1.5 hours on runway being towed back to gate. Wow.”

Additional reporting by David K. Li