The Las Vegas judge who was viciously attacked when a convicted felon lunged at her during his sentencing hearing in January said she thought she was going to die as she choked back tears in court Thursday.

Clark County District Court Judge Mary Kay Holthus got emotional — removing her glasses and apparently wiping away tears —  during a hearing in which attacker Deobra Redden pleaded guilty to attempted murder, the Las Vegas Review-Journal reported.

Holthus, 62, told jurors she felt “defenseless” when Redden tackled her and slammed her head against the floor — saying she believed court officials who rushed to help saved her life, according to the paper.

Judge Mary Kay Holthus got emotional — removing her classes and apparently wiping away tears —  during a hearing in which attacker Deobra Redden pleaded guilty to attempted murder. AP

“I absolutely thought, ‘He’s going to kill her,’” law clerk Michael Lasso told the jury.

Lasso said he wrestled Redden, 31, away from the judge and punched him to subdue the three-time felon — then saw Redden hitting a corrections officer who also intervened.

Holthus was about to deliver Redden’s sentence in a separate felony attempted battery case on Jan. 3 when he hurled himself over the bench in a stunning attack caught on camera.

Redden is shown in the footage sprinting up to the bench with outstretched arms then tackling the judge to the floor.

Deobra Redden hurled himself at the judge during a sentencing hearing in January. AP

On Thursday, lawyers  announced a plea deal, ending the trial after prosecutors spent more than two hours questioning Holthus  and Lasso about the attack.

Redden’s defense attorney, Carl Arnold, said his client suffered from schizophrenia, and was not taking his medication at the time of the attack.

Deobra Redden, 31, pleaded guilty to attempted murder Thursday. AP

Arnold said  Redden considered pleading not guilty by reason of insanity but that the defense strategy carried a too-high burden of proof.

He previously argued that Redden was not trying to kill Holthus.

Redden previously blamed his outburst on having a bad day and said he was trying to kill Holthus, according to court documents reported two days after the attack.

“Judge has it out for me,” Redden told officers after he was detained. “Judge is evil.”

Holthus was not hospitalized and returned to work after treatment for her injuries.

With Post wires