A judge has denied a petition to remove Travis County District Attorney Rosemary Lehmberg from office, meaning she will keep her job.

The ruling came Wednesday afternoon after three days of testimony. Multiple judges and attorneys testified on Lehmberg’s behalf, saying they have never seen her under the influence at work, and that removing her from office would harm the county’s justice system. The prosecution argued that Lehmberg had a drinking problem that prohibited her from performing her duties. They also asked the judge to consider how intoxicated the D.A. was and the way she treated law enforcement officers during her arrest.

The civil suit stemmed from Lehmberg’s drunken driving arrest last spring, after her Lexus was spotted swerving along RR 620 in northwest Austin. A rare Texas statute cites intoxication alone as grounds for removal from office on the county level.

Lehmberg spoke to reporters immediately after the decision and apologized for her behavior.

“I promise you I will work diligently to do the right thing, as I always have done,” Lehmberg said.