Two attackers, a policeman and a court worker have been killed in a car bomb and gun assault on a courthouse in the Turkish city of Izmir, state media say.
Officials blamed Kurdish militants for the attack. A third attacker is reportedly still being sought.
The attackers drove a car to the courthouse entrance, sparking an exchange with police and then detonating the car bomb.
A number of people were wounded in the explosion, some critically.
Some of Turkey's big cities have been targeted recently both by so-called Islamic State (IS) and by Kurdish militants.
Turkey launched a military operation in Syria in August to push back IS and Kurdish forces from the Turkish border.
IS had said it was behind last weekend's Istanbul nightclub attack that left 39 people dead.
Izmir's Governor Erol Ayyildiz said the attackers were armed with Kalashnikov rifles and grenades.
Deputy Prime Minister Veysi Kaynak added that, judging by the weapons found following the raid, a much larger attack was being planned.
Images from the scene showed two cars ablaze. The governor said that the second had been destroyed in a controlled explosion.
Reports of the number of people injured in the car bomb blast ranged from five to 11.
President Recep Tayyip Erdogan, speaking at the opening of a metro line in the capital, Ankara, said that Turkey was "under mutual attack by terrorist groups and they want Turkey to be brought to its knees".
He said: "They won't be able to set people against each other. They couldn't destroy our unity."
No-one has yet said they carried out the Izmir attack but the governor said initial findings pointed to the involvement of Kurdish fighters from the outlawed Kurdistan Workers' Party (PKK).
The PKK's bloody battle for independence
The PKK is fighting for an independent Kurdish state within Turkey.
It has carried out many attacks on Turkish security forces, particularly in the south-east.
In August a PKK car bomb in Cizre killed 11 policemen and injured 78. Another 10 soldiers and eight civilians died in a car bomb attack on a checkpoint in Durak in October.
In claiming the Istanbul nightclub attack, IS blamed Turkey's military involvement in the Syrian civil war.
At least 36 people are now in custody in connection with the attack, including many in Izmir, although the main suspect remains at large.
A number of those arrested in Izmir are from the Uighur ethnic group. They are believed to have come from China's Xinjiang region and have ties to the nightclub attacker, the state-run Anadolu news agency says.
Mr Kaynak said they were closing in on the gunman, saying he was possibly an ethnic Uighur.