A far-left group has been blamed for the incident, which saw two people storm a courthouse before being killed by police.
One person died and two assailants were fatally shot in an attack on a courthouse in Istanbul on Tuesday, Turkish officials said.
Posting on social media, Turkish Interior Minister Ali Yerlikaya wrote that the man and woman were killed during an “attempt to attack” a security checkpoint at the Caglayan courthouse at 11.46 am local time.
He said six people were wounded, including three police officers. President Recep Tayyip Erdoğan later said one of the civilians died.
Caglayan, which is also known as the Istanbul Justice Palace, is a huge court complex in the Kagithane district on the city’s European side.
The two attackers died as police stormed the building, while a prosecutor later died of his injuries.
“I congratulate our heroic police officers. I wish a speedy recovery to our injured,” the minister added.
The attack took place on the day when Turkey was commemorating the anniversary of an earthquake in the country’s south that killed thousands of people.
Mahir Yildiz heard gunshots as he left the courthouse. “One of the people was a woman and one was a man,” he said. “The police returned fire. The man was shot first, then the woman fired a few shots and they shot her.”
Another witness, Emre Ozyurt, said his “blood froze” as he was caught up in the attack. “People were very scared, there were people running left and right,” he said.
Yerlikaya later identified the attackers as members of the Revolutionary People’s Liberation Party/Front, or DHKP/C, a far-left group that is considered a terrorist organisation by Turkey, the US and the EU.
The DHKP/C has been largely inactive in recent years. In March 2015, the group took a prosecutor hostage at the same courthouse, demanding details about the police killing of a teenager during anti-government protests the previous year.
The group also claimed responsibility for a February 2013 suicide bomb attack on the US Embassy in Ankara in which a Turkish security guard was killed and four other people wounded.
In recent years, Turkey has seen other small-scale violent attacks associated with different terror groups.
Last month, a man was shot and killed at an Istanbul church in an attack that was claimed by the Islamic State group.
Two men were later arrested on suspicion of killing Tuncer Cihan, 52, on January 28 at the Santa Maria Church in the Buyukdere neighbourhood. Dozens of suspected IS members and supporters also were detained.