The state-run Anadolu Agency said police later caught one person in connection with the attack, but provided no details.
The private Dogan news agency said one of the assailants, a woman, was injured in the crossfire and was captured inside a nearby building where she hid. No one else was injured in the onslaught.
Hours earlier an overnight bomb attack at a police station in Istanbul injured 10 people, including seven police officers, and caused a fire that collapsed part of the three-story building.
Police said the assailants exploded a car bomb near the station.
Unknown assailants later fired on police inspecting the scene of the explosion, sparking another gunfight with police that killed two of the assailants. The attacks come at a time of a sharp spike in violence between Turkey’s security forces and rebels of the Kurdistan Workers’ Party, or PKK.
In 2013, a suicide bombing at the US Embassy in the capital Ankara killed a Turkish security guard and injured one other person. The DHKP-C claimed responsibility for the attack.
Turkey is also taking a more active role against self-styled Islamic State (IS) militants.Last month it conducted aerial strikes against IS positions in Syria and agreed to let the US led coalition use its bases for its fight against IS. The move followed a suicide bombing blamed on IS which killed 32 people and after IS militants fired at Turkish soldiers from across the border in Syria, killing one soldier.On Sunday, the US military announced that a detachment of six F-16 fighter jets have arrived at Turkey’s southern Incirlik Air Base to join the fight against IS militants.Turkey last month carried out a major security sweep, detaining some 1,300 people suspected of links to terror organizations, including the PKK, IS and the banned far-left Revolutionary People’s Liberation Army-Front, or DHKP-C.