Updated

A suspected Islamic extremist on trial for killing a high court judge was subdued by security forces Friday after he tried to escape from the courtroom to attend traditional prayers.

Alparslan Arslan is on trial with eight alleged accomplices, accused of fatally shooting a judge in a killing that stoked tensions between Turkey's secular establishment and the Islamic-rooted government.

On the trial's opening day, Arslan asked the court for permission to leave to pray, but Judge Orhan Karadeniz refused, saying the proceedings could not be interrupted for prayers.

Arslan then tried to escape but was caught by guards. The trial was briefly adjourned.

In the afternoon session, Arslan again tried to escape after hearing a call for prayers from a nearby mosque, but was stopped by guards once more, the private Dogan news agency reported.

Arslan is accused of bursting into Turkey's highest administrative court May 17 and shooting five judges, killing one. He has told the court that he planned and carried out the attack as well as a grenade assault on Turkey's pro-secular Cumhuriyet newspaper in May, which caused minor damage but no injuries.

"I threw bombs at Cumhuriyet. I attacked the head of the administrative court and its members," he told the court.

The prosecutor's indictment said Arslan and his accomplices carried out the attack on the judges because they were angered over a ruling in support of a ban on wearing Islamic-style head scarfs. Prime Minister Recep Tayyip Erdogan's government supports relaxing that ban.

Before he opened fire, the gunman shouted, "I am a soldier of God," and said he was punishing the judges for the head scarf ruling, authorities have said.

After the shootings, tens of thousands of secular Turks marched, holding Erdogan's government responsible for the assault. Erdogan had criticized the judges' February decision to bar a teacher from being promoted because she wears an Islamic-style head scarf off-duty.

Erdogan has insisted the attack had no Islamic motives and put the blame on a shadowy far-right group.

Although overwhelmingly Muslim, Turkey is a strictly secular country and the wearing of head scarves or other religious clothing is banned in public offices and schools.

Erdogan — who became prime minister in 2003 — and several of his ministers belonged to a pro-Islamic party that was pressured out of power in 1997 by the military. The party was subsequently shut down by the Supreme Court for violating the country's secular principles.