The suspected attacker said the shootings were in retaliation for a recent ruling against a teacher who wore an Islamic-style head scarf.
The dead judge, Mustafa Yucel Ozbilgin, was shot in the head and died later in hospital, the Anatolia news agency reported.
Four of the judges – including Ozbilgin – had voted in February against the promotion of an elementary school teacher who wore an Islamic-style head scarf outside of work.
The fifth had voted in favour.
The judges’ pictures had earlier been published in a national pro-Islamic newpaper, Vakit.
“This attack is aimed at the unchangeable secular and democratic characters of the Republic. No one should doubt that … these will be protected forever”
Turkey’s president, Ahmet Necdet Sezer
The attacker, who was detained and was being interrogated by anti-terrorism police, reportedly shouted “I am the soldier of God,” before opening fire.
He said he carried out the attack to punish the judges for their decision on head scarves, Tansel Colasan, the deputy head of the administrative court, told reporters.
The head of the court chamber, Mustafa Birden, was wounded in the liver and the spleen and was successfully operated on, Dr Ugur Erdener of Hacettepe University Hospital said.
A sixth judge escaped the attack unharmed by throwing himself onto the floor, reports said.
Birden reportedly had received death threats, and the administrative court complained recently that its members could become targets, private CNN-Turk TV said.
The TV station reported that the attacker, a lawyer, had been under observation by police for alleged ties to the radical Turkish Islamic group of Hezbollah.
The group bears the same name as the better known Lebanese group, but is unrelated.
The attack is likely to stoke tension between the secular establishment and the Islamic-rooted government of Recep Tayyip Erdogan’s government, which had strongly criticised the court’s headscarf decision in February.
Opposition parties held Erdogan’s government responsible while the country’s pro-secular establishment, including the president, Ahmet Necdet Sezer, the powerful military and judiciary denounced the attack.
“This attack will go into the history of the republic as a dark stain,” Sezer said.
“These attacks will never reach their goal,” he said, adding that the justice system would not be intimidated and would fulfill its duty with “loyalty to the secular and democratic republic.”
“The existence of the secular Republic is officially under threat”
Opposition lawmaker, Kemal Anadol
Sezer later visited the administrative court and said: “This attack is aimed at the unchangeable secular and democratic characters of the Republic. No one should doubt that … these will be protected forever.”
General Hilmi Ozkok, chief of the General staff, condemned “this vile attack with hate.”
The Ankara bar association openly warned Erdogan’s government not “to encourage the enemies of the secular regime,” while members of the administrative court criticised the government for not protecting the judiciary.
Deniz Baykal, chairman of the main opposition Republican People’s Party, held Erdogan’s government responsible for the attack.
“I hope those who still can’t see where Turkey is being dragged, who refuse to see it, will take this as a warning,” Baykal said.
“Unfortunately, blood has spilled into politics in Turkey. Turkey is being dragged into a very dangerous situation. Everybody should come to their senses.”
Erdogan also condemned the attack, and said the culprit would be severely punished.
Turkey‘s secular military is deeply uncomfortable with the government’s position on the head scarf issue and what is sees as a creeping Islamisation of society. The tensions also spread to the parliament on Wednesday.
“The existence of the secular Republic is officially under threat,” opposition lawmaker Kemal Anadol shouted to the applause of members of his Republican’s People’s Party while cabinet members tried to defuse criticism over the government’s attitude.
Some 99 percent of Turks are Muslims.
The country’s secular establishment, however, which includes the courts and the military, has sought for decades to restrict Islamic influence, which some political leaders view as an obstacle to Western-style modernisation.
Erdogan’s wife, Emine, wears a head scarf, and his governing Justice and Development Party has made no secret of its desire to lift a ban on wearing veils in government buildings and universities.