Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

It seemed like a set up to a tired joke: A lawyer’s pants caught on fire in court.

But on Wednesday, it was Stephen Gutierrez’s reality when the Florida defense attorney’s pants began smoking during an arson trial, Eleventh Circuit Court Public Relations Director Eunice Sigler confirmed to NBC News Thursday.

Gutierrez, 28, was in the in the Miami-Dade county courtroom defending 49-year-old Claudy Charles, who was accused of setting his car alight.

But During his closing argument, Gutierrez began to feel heat coming from his pocket where he had several electric cigarette batteries, he told NBC News in an email.

Stephen Gutierrez. thelawdoctor.net

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

As Gutierrez argued Charles’ car had merely spontaneously combusted, the lawyer’s pants seemed to do the same.

Witnesses in the courtroom told the Miami Herald the moment was "surreal," as Gutierrez rushed out of the courtroom while smoke billowed from his pocket.

Gutierrez said as the heat intensified, he hurried into the bathroom where he tossed the battery in water. He was able to return to the courtroom with a singed pocket.

"This was not staged," Gutierrez said. "No one thinks that a battery left in their pocket is somehow going to 'explode. After careful research, I now know this can happen. I am not the only one this has happened to, but I am in a position to shed light on the situation."

Reports of electronic cigarette batteries exploding have been documented across the country. Battery malfunctions have been known to cause burns on the hands and face, fractured bones and even loss of eyesight.

In 2016, a 19-year-old’s e-cigarette exploded in his pants pocket, setting his pants on fire and causing serious burns on his upper thigh.

But because e-cigarettes aren’t regulated, there’s no record of how many faulty devices have exploded or injured people.

Luckily, it seems Gutierrez came away from the explosion unscathed.

"The dangers of these devices, and accessories, have led me to quit using e-cigarette products," Gutierrez said.

A Florida State Attorney's Office spokesman said he could neither confirm or deny an investigation was ongoing into the incident, but said no arrest had been made.