Turkish police on Tuesday shot dead two assailants from a leftist organisation, branded "terrorists" by authorities, who attacked a security checkpoint outside Istanbul's main court, killing one person and injuring five, officials said.
Interior Minister Ali Yerlikaya said the assailants were members of the Revolutionary People's Liberation Party-Front (DHKP-C) -- a fringe leftist group that has staged periodic attacks in Turkey since the 1980s.
The DHKP-C issued no initial claim of responsibility.
The group, which is considered a terrorist organisation by the United States, has been fighting US influence in the Middle East and across the world.
In 2014, Washington offered a $3 million reward for the capture of the group's leaders.
"I congratulate our security forces, who eliminated the treacherous attack with timely intervention," President Recep Tayyip Erdogan said in televised remarks.
"Two terrorists, one a woman and the other a man, were neutralised."
Erdogan said the attack injured three police and three civilians, one of whom died later.
A witness told AFP the assailants opened fire on police after a brief altercation at a checkpoint leading to a main entrance to the sprawling building, which has been used for some of Turkey's biggest trials.
"A conflict broke out at the exit gate. I saw two people, a man and a woman, shooting at the police. The male was shot first. Then the woman fired a few more shots. They shot her," said 25-year-old Mahir Yildiz.
"I heard 20-25 gunshots. There was great panic and fear at that moment. We didn't know which way to go. The police blocked the entrance and exit and gathered everyone inside".
Police sealed off the courthouse entrances as a security precaution.
- 'Heroic police' -
Justice Minister Yilmaz Tunc said "heroic police officers prevented a treacherous attack", adding that prosecutors had launched a "multi-faceted investigation".
Turkey has begun to emerge from a violent spell which started a decade ago, when it was hit by repeated bombings and other attacks linked to jihadist fighters and Kurdish militants.
Although those attacks have largely eased, Istanbul and the capital Ankara remain on high alert.
Last month, one man was shot dead by two gunmen who opened fire inside a Catholic church in Istanbul.
The attack was claimed by Islamic State group jihadists.
In October, two assailants injured two police in an attack on the government district in Ankara that was claimed by Kurdish militants.
Turkey responded by stepping up air strikes against Kurdish targets in Syria and Iraq.
In one of its highest-profile attacks, the DHKP-C in 2013 staged a suicide bombing of the US embassy in Ankara, killing a Turkish security guard.