A United Airlines flight was rerouted to a Denver airport after a passenger got stuck in the jet's bathroom.

Flight 1554 from Washington, D.C., to San Francisco had to make a pit stop at the Denver International Airport on Wednesday night "to assist a customer who was in the lavatory when the lavatory door became inoperative," a United Airlines spokeswoman told NBC News.

The passenger was safely freed from the bathroom once the aircraft landed. It's not clear how long the customer was trapped.

Well folks it’s never a dull moment on @united , we have to make an “emergency landing” in Denver because a passenger got stuck in the bathroom. You can’t make this up...also the Wi-Fi is crappy and there is no way for me to charge my phone, happy travels. #unitedairlines pic.twitter.com/FHieakiO7Z — TK (@taylorkkimber) September 26, 2019

A video posted on Twitter shows several people trying to open the jammed door. A spokesperson for the airport said the Denver Fire Department responded to the scene to assist in getting the passenger out.

One rescuer is heard in the video telling the passenger, that he would get her out soon.

United said customers were put on a different plane and have since reached their destination.

"We are reaching out to all customers onboard and the customer in the lavatory to apologize," the spokesperson said.