There’s no good time to have your pants spontaneously burst into flames. But one of the worst times to have it happen has to be when you’re in the middle of trying to defend someone during an arson trial. And yet, that’s exactly what happened to a Miami defense lawyer named Stephen Gutierrez on Wednesday afternoon.

Gutierrez was standing in front of a jury making his closing arguments at the end of an arson case when smoke started coming out of his right pants pocket. When it happened, he was trying to convince the jury that his client had not set his car on fire on purpose and that it had spontaneously combusted. He immediately ran out of the courtroom as his pants caught fire, while jurors were escorted out of the courtroom. And when he returned a few minutes later unharmed but with burn marks on his pants, he insisted that he had not tried to start the fire on purpose. Instead, he claimed a faulty e-cigarette had caused the fire to take place.

Those in the courtroom weren't necessarily sold on Gutierrez’s story. Gutierrez gave officers in the court charred e-cigarette batteries as evidence. But one witness told the Miami Herald that the lawyer was fiddling around in his pocket minutes before addressing the jury. And if a judge finds that Gutierrez did tamper with his e-cigarette on purpose to try and prove a point to jurors, he could be held in contempt of court.

Regardless of what the judge decides, not even an exploding e-cigarette could help Gutierrez win the case. His client Claudy Charles, who had been accused of intentionally setting his car on fire in Miami, was convicted of second-degree arson by jurors. So Gutierrez lost the trial and a pair of pants in the process. Not his best day as a lawyer.