It was reported the prosecutor was heavily wounded and taken to the hospital, an Istanbul police chief said.
UPDATE: Prosecutor seems to only have been wounded, is being rushed to the hospital - @heavie— Conflict News (@rConflictNews) 31 Март 2015
The police may have launched an operation to free the hostage. However, Turkish authorities have not confirmed the information yet.
Gunfire has been heard in the video that had apparently been shot during the rescue operation in Istanbul.
Turkish security forces and several ambulance cars are waiting outside the building.
A Turkish TV station said that two militants from the far-left group the Revolutionary People's Liberation Party Front (DHKP-C) had been killed during the shootout with police.
Latest: 3 militants, all of them, were killed by police in shootout. A bloody end for the hostage crisis. Prosecutor wounded and in hospital— Abdullah Ayasun (@abyasun) 31 Март 2015
A Turkish prosecutor, Mehmet Selim Kiraz, has been held hostage by an armed far-left group the Revolutionary People's Liberation Party Front in a courtroom in Istanbul.
Kiraz has been leading an investigation into the death of 15-year-old Berkin Elvan, who was hit on the head by a police officer in June 2013, during a mass anti-government rally in Istanbul. He died in March 2014, following 269 days in a coma.
The group demanded to arrest those responsible for Elvan's death, otherwise they threatened to kill the prosecutor.
The Turkish Prime Minister's office has reportedly imposed a temporary media ban on Tuesday on coverage of the hostage-taking situation involving a prosecutor in Istanbul, citing "national security" concerns.
The DHKP-C is a radical leftist group, founded in 1978 as Revolutionary Left, and then re-branded in 1994. The organization is considered a terrorist group in Turkey, after carrying out several attacks.