The plane was headed for LaGuardia Airport on Wednesday evening.
The pilot got the attention of a passenger and gave him the cockpit door security code so he could alert the co-pilot.
But the co-pilot was alarmed by the passenger's heavy foreign accent.
That led to an emergency landing at LaGuardia, with the FBI waiting.
The trapped pilot got free in time to settle things down just before fighter jets were scrambled.