Southwest is denying an allegation that two of its pilots hid a camera in a plane bathroom.

A flight attendant is suing Southwest Airlines after she allegedly saw two pilots live-streaming video from a plane lavatory to the cockpit.

The company, however, has insisted the incident was nothing more than a bad joke.

Flight attendant, Renee Steinaker claims she caught the pilots during a 2017 flight from Pittsburgh to Phoenix.

Steinaker alleges that when she entered the cockpit of the plane after Capt. Terry Graham went to use the lavatory, she saw an iPad mounted to the windshield showing real-time footage from one of the plane’s toilets.

Co-pilot Ryan Russell, allegedly told Steinaker to keep quiet about the camera, which he said was a “top-secret security measure”.

The airline said the incident was “an inappropriate attempt at humour”.

Steinaker claims she experienced retaliation from managers who allegedly told her “if this got out, if this went public, no one, I mean no one, would ever fly our airline again”.

The lawsuit also alleges that Graham left a loaded gun in the cockpit after disembarking.

Both pilots are still flying with the carrier today, the lawsuit further alleges.

Speaking to the Daily Mail, a Southwest Airlines spokesperson said: “When the incident happened two years ago, we investigated the allegations and addressed the situation with the crew involved.

“We can confirm from our investigation that there was never a camera in the lavatory; the incident was an inappropriate attempt at humor which the company did not condone.”

The carrier has said it is prepared to “vigorously defend the lawsuit.”