In a monumental screw-up, Port Authority security at Kennedy Airport last week allowed a plane suspected of carrying terrorists and explosives to taxi right to the gate — while diverting a second aircraft that had nothing to do with the scare to an isolated area, a Post investigation has revealed.

Making matters worse, those allegedly responsible lied to agency officials and tried to cover up their incompetence by blaming the blunder on the Federal Aviation Administration, a source said.

The frightening mistake — which could have cost an untold number of lives — occurred last Monday, when JFK went into full-scale terror alert after someone called in a warning that two inbound flights had explosives in their wheel wells and that would-be hijackers were on board both jets.

The 3 p.m. call — which was later determined to have been a hoax — named an American Airlines flight from San Francisco and a Finnair jet from Helsinki.

The tip included the planes’ flight numbers.

Port Authority police and other agency security officials decided to order the planes to taxi to a remote section of the airport, where the aircraft and their passengers were to be inspected.

But “there were two Finnair flights coming in at about the same time,” the source said.

“They brought the wrong flight to the hijack area and let the other one just go to the gate, where the passengers got off.

“They just screwed it up. Luckily, it was a false alarm.”

PA brass briefed on the operation were told that the confusion was the fault of the Federal Aviation Administration.

But FAA officials insisted they identified the suspect planes based on information from the PA.