Two members of a banned leftist group and a prosecutor they held hostage inside a courthouse in Istanbul died Tuesday after a shootout between the hostage takers and police, officials said.
Istanbul's police chief, Selami Altinok said police had negotiated with the gunmen for six hours before the violent end of the hostage situation.
The prosecutor, identified by the state-run Anadolu Agency and state television TRT as Mehmet Selim Kiraz, was shot in the head during the standoff and rushed to hospital where doctors tried to save his life, Turkish President Recep Tayyip Erdogan said earlier Tuesday.
Turkish Prime Minister Ahmet Davutoglu and hospital officials later announced he had died.
Private news agency Dogan reported police special forces had entered the building, which was evacuated. It wasn't clear how the assailants sneaked the arms into the courthouse.
Kiraz was the prosecutor investigating the death of a teenager who was hit by a police gas canister fired during nationwide anti-government protests in 2013.
A website close to the left-wing DHKP-C group said that militants from the banned organization had taken the prosecutor hostage at midday and had given authorities three hours to meet five demands, including forcing policemen held responsible for the teenager's killing to confess to the death.
The group also demanded that the policemen be tried by "peoples' courts" and for court officials to drop prosecutions or investigations against people who took part in protests denouncing the boy's death. The website showed a picture of someone holding a gun to a man's head with posters from the group in the background.
Deputy Chief Prosecutor Orhan Kapici confirmed that the incident was related to Kiraz's investigation into the boy's death.
The DHKP-C, which seeks a socialist state, is considered a terrorist organization by Turkey, the U.S. and the European Union.
The group has carried out sporadic attacks, including a suicide bombing on the U.S. Embassy in 2013 that killed a security guard. The group was more active in the 1970s.