It sounds like the start of a joke, but for the Kansas City, Missouri, Police Department, it wasn't very funny.

Twelve of the department's police officers were stuck in an elevator Wednesday and needed help from their friendly rivals at the St. Louis Fire Department.

>> Read more trending stories

The elevator in the department's police academy in Kansas City, Missouri malfunctioned, leaving the officers stuck between floors.

"We had a lot of fun with them and we made sure everything happened safely and we did it all the way it's supposed to be done," firefighter Tony Pisciotta told WDAF. "They were good sports about it and we threw our jabs. It was cool."

Gregg Favre from the St. Louis Fire Department tweeted an image of the officers being rescued in good fun.

Soon after, the Police Department shared the image on Facebook with a humorous caption : "Well, that was embarrassing."

"We have a good relationship with the Police Department, and it is just a lot of fun," Tim Dupin, a business representative for Local 42 of the International Association of Firefighters told The Kansas City Star. "We are able to laugh at each other and have a good time, but we are always supportive of each other."

None of the officers were hurt. "Everyone was physically safe, but egos were severely injured," the department said.

Well, that was embarrassing.

Posted by Kansas City Missouri Police Department on Wednesday, April 27, 2016