A jail guard testified Wednesday that Florida mass shooter Nikolas Cruz attacked him then grabbed his Taser nine months after the Parkland high school massacre that left 17 people dead.

The Nov. 13, 2018, confrontation was captured on surveillance footage that was shown to jurors during Cruz's penalty trial in Broward County Circuit Court in Fort Lauderdale.

The attack occurred while Cruz was being held in isolation after he slaughtered 14 students and three staffers at Marjory Stoneman Douglas High School on Feb. 14, 2018.

FLORIDA MASS SHOOTER NIKOLAS CRUZ TOLD GUN SHOP OWNER AR-15 WAS FOR HUNTING

Nikolas Cruz in court during jury selection

Marjory Stoneman Douglas High School shooter Nikolas Cruz tucks his sweater in while waiting for prospective jurors to enter the courtroom during jury selection in Fort Lauderdale, Florida, April 26, 2022.  (Amy Beth Bennett/South Florida Sun-Sentinel via AP, Pool)

Broward County sheriff's Sgt. Raymond Beltran was seated at a desk when he told Cruz, who was pacing in his orange jail uniform and a pair of shower slippers, to walk more carefully. 

Cruz flashed both middle fingers at Beltran then charged at him, knocking the guard onto the ground and grabbing hold of his Taser.

PARKLAND SCHOOL SHOOTING TRIAL: ‘THINGS ARE ABOUT TO GET BAD,' GUNMAN WARNS STUDENT

The two wrestled over the weapon, which discharged but didn't hit either of them. Beltran wrested it back from Cruz then used it to bash him in the head, the guard testified. Cruz later pleaded guilty to the assault.

Diagram showing details of Parkland school shooting

Graphic gives details of the Marjory Stoneman Douglas High School shooting. (Associated Press)

Prosecutors are using the conviction as an aggravating circumstance in arguing that Cruz should be executed. Cruz, 23, pleaded guilty in October to 17 counts of first-degree murder.

CLICK HERE TO GET THE FOX NEWS APP 

 The jury will decide whether Cruz will spend the rest of his life in prison or be executed.

The Associated Press contributed to this report.