Last month, Donald Trump thanked a Colorado fire marshal who rescued him and his entourage from a stalled elevator by accusing him of intentionally keeping supporters out of his rally.

What Trump didn’t divulge was that a member of his entourage apparently fiddling with an elevator bypass key got the group stuck in that elevator in the first place, internal emails obtained by local TV station KMGH and published Wednesday revealed.

Called to the Wyndham hotel where the Trump campaign was staying on July 29, Colorado Springs firefighters found the Republican presidential nominee and nine others stuck in an elevator between the first and second floors.

In one of the emails obtained by KMGH, Fire Marshal Brett Lacey explained to a friend that “the elevator fiasco” occurred because a member of Trump’s Secret Service detail or entourage made use of a bypass key to stall the elevator.

“it was funny,” Lacey wrote, according to KMGH.

“they (one of them) turned it off between floors and didn’t know how to get it back on.. our folks went and fished them out… elevator guys get there and say what the crap? Who turned this off? Turned it back on and voila,” he continued.

Though Trump and his companions were evacuated through the top elevator hatch by members of the fire department, the incident resulted in Trump arriving an hour late to his rally on the University of Colorado-Colorado Springs campus (UCCS).

Upon arrival, Trump proceeded to criticize the fire marshal for keeping some of his supporters out of the venue.

“We have thousands of beautiful, wonderful, great people outside, and we have in the room next door over 1,000 people,” Trump said at the rally. “They won’t let them in. And the reason they won’t let them in is because they don’t know what the hell they’re doing.”

The emails obtained by KMGH indicated that the fire department, UCCS and Trump campaign all had been in communication about the exact number of people allowed in the main hall and overflow room. The limits allowed for 1,500 people in the event center and 1,000 in the overflow room.

Lacey expressed his frustration in an email to his friend.

“We had worked with UCCS of which we have a great relationship with and their security.. (University Cops)…. And our PD… and worked out the event loading on Thursday,” he wrote, as quoted by KGMH. “All was well.. until they wanted more people… Secret Service were butts too… wanted me to let more people in because he (Trump) was threatening to leave the room.. and they hadn’t secured the other location. I communicated to them that my problem was the public.. theirs was their candidate.”

Lacey also wrote that it was’t his “problem” that the campaign allegedly “dispersed 10K on-line tickets for a 2500 load event.”

KMGH also obtained a contract the Trump campaign signed with UCCS promising to comply with the facility rules “prescribed by the Fire and Police Departments.”

Contacted by the news station about that new information, a Trump spokesperson said the campaign had no interest in keeping that particular story alive.