A gunman has shot dead a prominent judge and wounded four others in an attack in Turkey's highest court, in the capital, Ankara.
The judges were in session when an armed man burst in
Judge Mustafa Yucel Ozbilgin died despite six hours of surgery to remove a bullet from his brain.
One of the wounded judges had been criticised for ruling against teachers wearing Muslim headscarves, and had reportedly received death threats.
The attacker, believed to be a lawyer, was detained by police.
Identified as Aslan Alpaslan, 29, he is being questioned to determine his motive.
But the BBC's Sarah Rainsford in Istanbul says many here already see this as an attack on secularism itself - the founding principle of the Turkish republic.
'Soldier of God'
The attacker was apparently carrying papers that identified him as a lawyer - although it is not known if these were genuine - and made it past security guards undetected.
He reportedly burst into a committee meeting of the Council of State, the top administrative court, at 1000 local time (0700 GMT) shouting "Allahu akbar" (God is great) as he fired his weapon.
Tansel Colasan, deputy head of the Council of State, said the attacker yelled "I am the soldier of God", and said he was carrying out the attack to protest against the court's decision on headscarves.
He was arrested immediately.
There were scenes of panic at the court as the injured were carried out of the building.
Judge Mustafa Birden made headlines earlier this year when he ruled that schoolteachers, who are banned from wearing the Islamic headscarf at work, could not cover their heads even on their way to school.
An Islamist newspaper printed photographs of him and fellow judges from the court's second chamber, which deals with education issues.
Judge Birden was shot in the stomach and has undergone surgery. Doctors said his injuries were not life-threatening.
The three other judges were only lightly injured.
Our correspondent says the attack has helped fuel widespread speculation that the court was targeted for its strict, some say hardline, adherence to secular principles.
The court's decision on headscarves has been condemned as illegal by Prime Minister Recep Tayyip Erdogan, whose ruling party has Islamist roots.
Relatives gathered outside following the attack
Mr Erdogan, though, was quick to condemn Wednesday's attack, and said the culprit would be severely punished.
Nevertheless Deniz Baykal, chairman of the secularist main opposition Republican People's Party, said the government's policies were responsible.
"I hope those who still can't see where Turkey is being dragged, who refuse to see it, will take this as a warning," he said.
"Unfortunately, blood has spilled into politics in Turkey. Turkey is being dragged into a very dangerous situation. Everybody should come to their senses."
President Ahmet Necdet Sezer said the attack would not undermine Turkey's secular constitution.
"These attacks will never reach their goal," he said, adding that the justice system would not be intimidated and would be loyal "to the secular and democratic republic".