DALLAS, TEXAS — A passenger on a Southwest Airlines flight documented an unusual sight: a pilot, locked out of the cockpit, attempting to regain access through the plane's window.

Matt Rexroad took to Twitter to share an image of the pilot balancing on the airstair, partially inside the plane's window, striving to unlock the door. According to Rexroad, the last passenger from a previous flight had accidentally locked the cockpit door when disembarking.

Southwest confirmed to Insider that a lavatory door had been inadvertently opened by a passenger, which then secured and locked the cockpit door. "One of our pilots unlocked the door from a flight deck window, and the flight departed as scheduled," a representative said.

Rexroad, who was flying from San Diego to Sacramento, California, praised Southwest for its dedication to keeping flights on schedule. "I think it is amazing that Southwest Airlines goes above and beyond to get their flights to be on time. Excellent effort by the flight and the crew," he told Insider via email.

Southwest humorously responded to Rexroad's tweet, acknowledging that it was a rare sight, and thanked Rexroad for his support after he expressed his love for the airline.

Twitter users reacted with surprise, many not realizing that cockpit windows could be opened. One user even humorously suggested the pilot could have tried using a coat hanger to unlock the door.

This incident was not the first of its kind. In a TikTok posted last July, a similar event occurred with an American Airlines pilot seen entering the plane via the windscreen.