A passenger got stuck in the toilet of a United Airlines Flight, forcing the flight to divert to Denver, Colorado.

A female passenger got trapped inside the toilet of Flight 1554 which was on its way to San Francisco from Washington D.C.

“The lavatory door became inoperative,” the Airlines said in a statement released.

The passenger was freed after the plane landed. She was unhurt.

“The passenger was safely removed from the lavatory after landing, and customers have since continued on to their destination on a new aircraft," the airline said in its statement.

"Everyone clapped, the woman came out, they all felt very bad for her. I mean, I don't know how she was with landing in the bathroom, but she was fine," Jennifer Gettman, a passenger on the flight told KPIX-TV.

In a video of the incident posted online, maintenance technicians can be seen trying to open the door.

"We're just working on opening up the door at the moment, ma'am. We'll get you out soon, OK?" one of them can be heard saying.

United Airlines said it is reaching out to customers and apologizing, including to the woman who was stuck in the lavatory.

The flight was supposed to reach San Francisco at 8:38 p.m. Wednesday night. However, it took off from Denver, two hours after landing and reached San Francisco after 11 p.m.

United Airlines
A United Airlines plane sits on the tarmac at San Francisco International Airport in California on April 18, 2018. Justin Sullivan/Getty Images