BROWARD COUNTY, Fla. -- Accused Parkland shooter Nikolas Cruz faces new charges after authorities say he attacked a Broward County deputy in jail.

Related: Parent of Parkland shooting victim is disgusted because Nikolas Cruz registered to vote in jail

It allegedly happened Tuesday evening at the Broward County Main Jail in Fort Lauderdale.

The guard told Cruz not to drag his sandals on the ground while walking around the dayroom area, and Cruz responded by giving him the middle finger, according to court documents. As the deputy began to stand up, Cruz allegedly rushed up and punched him in the face.

Investigators say Cruz then shoved the guard to the ground and punched him multiple times in the head, as he lay on top of him. As the deputy tried to stop him, Cruz grabbed the guard's stun gun and discharged it.

Cruz eventually stopped attacking the guard after the deputy wrestled the stun gun back and struck him in the face, according to an official complaint. Cruz then backed off, and the guard got control of him, authorities say.

Jail records indicate Cruz, 20, has been charged with three new counts: aggravated assault on an officer, battery on an officer and using an electric or chemical weapon against a law enforcement officer.

Previous: Parkland’s Nikolas Cruz made chilling videos before shooting: ‘You’re all going to die’

Cruz is accused of opening fire at Marjory Stoneman Douglas High School on Feb. 14.

Seventeen people were killed, and 17 more suffered non-fatal injuries. In that case, Cruz faces 17 counts of first-degree murder and 17 counts of attempted murder.

Asked about the situation, the Broward County State Attorney's Office replied: "We have no comment."

10News left a message for Cruz's defense attorney. We will update this story if we hear back.

Make it easy to keep up-to-date with more stories like this. Download the 10News app now.

Have a news tip? Email desk@wtsp.com, or visit our Facebook page or Twitter feed.