(Chris Rank/Bloomberg)

A flight from Asheville, N.C., to New York had to make an emergency landing when the pilot became locked in the bathroom and the co-pilot thought his disappearance meant the plane was under attack.

The co-pilot radioed air traffic controllers at La Guardia airport when a man “with a thick foreign accent” tried to get into the cockpit. According to KATU.com, the pilot asked a passenger to notify his co-pilot and gave the passenger the code to the locked-down cockpit — but the co-pilot did not believe the story.

“The captain has disappeared in the back and, uh, I have someone with a thick foreign accent trying to access the cockpit right now,” the co-pilot can be heard on the radio call. It was a 14-passenger plane, so the only flight attendant on board had joined the co-pilot in the cockpit while the pilot was out, per federal regulations.

Traffic control told the co-pilot to make an emergency landing, but before he did, the pilot managed to free himself from the lavatory “and calm his anxious colleagues,” ABC news reports.

Emergency crews met the plane when it landed at 6:30 p.m., and decided that the whole thing was a big misunderstanding courtesy of a busted bathroom door.

This is hardly the first time a pilot has run into trouble in an in-flight restroom break. On an Air Canada flight in 2006, a pilot managed to get out of the bathroom but couldn’t get back into the cockpit. The flight attendants had to remove the door from its hinges.

A spokesman for the airline wrote in an emailed statment, “No one was ever in danger and everyone, including the good Samaritan who tried to help the caption as well as the crew, are to be commended for their actions.”