The trial of a man suspected of carrying out ISIS terrorist attacks in Tunisia descended into chaos this week after he lunged at a judge and bludgeoned him with his own gavel.

Adel Ghandri, who was in a Tunis military court Tuesday alongside other suspects facing the same accusations, managed to wrest control of the gavel and used it to strike the judge on his head, Tunisian justice officials told the Associated Press.

Ghandri, 33, is suspected to be among those who attacked a military station in Ben Guerdane, near the border with Libya, where assailants allegedly tried to create an emirate on behalf of the Islamic State group two years ago.

FATHER OF WOMAN WHO JOINED ISIS SUES TRUMP ADMINISTRATION, SEEKING DAUGHTER'S RETURN TO US

It was not clear if the judge was injured in the incident.

Ghandri also is accused of playing a role in two other attacks in Tunisia that killed 60 people in 2015.

BRITISH ISIS BRIDE SHAMIMA BEGUM TRIES TO USE HER BABY TO GET BACK INTO UK, CLAIMING HE'S SICK

In one of the attacks, panicked tourists fled from a popular beach as a gunman pulled an automatic rifle out from under an umbrella and began shooting, officials said.

In the other attack, gunmen started shooting at guests inside a museum in Tunisia’s capital.

CLICK HERE FOR THE FOX NEWS APP

The Associated Press contributed to this report.