Emergency services at the scene of an explosion in Izmir, Turkey, on Jan. 5. Two suspected attackers were killed in a shootout with police. (Associated Press)

Militants wielding assault rifles exchanged gunfire with police outside a courthouse in western Turkey on Thursday, killing at least two people and setting off a car bomb in the latest of a string of attacks that have the country on edge.

Police fatally shot two of the attackers outside a courthouse in the city of Izmir, and another assailant escaped, the local governor said, according to the state-run Anadolu news agency. A police officer and courthouse official were also killed. Local officials have blamed the assault on the Kurdistan Workers’ Party, or PKK, which is fighting a war for autonomy for ethnic Kurds.

The violence in the Aegean coastal city of Izmir came as Turkey expanded a manhunt for a gunman who stormed a nightclub early Sunday and killed 39 people at a New Year’s event.

[After nightclub carnage, raids and detentions]

Police raided homes Wednesday in Izmir in search of the suspect and detained at least 20 people. Security forces also found “military equipment” at the scene, Anadolu reported.

(Reuters)

The Islamic State claimed links to the nightclub assailant, but Turkey has also faced repeated attacks from Kurdish separatists such as the PKK.

There was no immediate claim of responsibility in Thursday’s attack in Izmir, where video posted on social media carried sounds of sustained gunfire.

The attackers were armed with Kalashnikov-style rifles and grenades, Izmir’s regional governor, Erol Ayyildiz, told reporters, according to the Associated Press.

[Opinion: Secular Turks have never felt so alone]

Turkish Deputy Prime Minister Veysi Kaynak, also speaking to reporters at the blast site, said a much larger attack was apparently being planned.

“Based on the preparation, the weapons, bombs and ammunition seized, it is understood that a big atrocity was being planned,” Kaynak told reporters in comments broadcast live, according to the Reuters news agency.

The rampage Sunday marked one of the worst mass killings in Turkey in recent memory. The country has been reeling from a steady stream of violence, including the assassination of the Russian ambassador last month and earlier bombings targeting police and tourist sites.

On Wednesday, Turkish Foreign Minister Mevlut Cavusoglu gave no further details on the suspect’s identity but said authorities are investigating. Police have conducted raids across the country.

Murphy reported from Washington.

Read more:

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news