IZMIR, Turkey (Reuters) - Turkish police detained 18 people over a gun and bomb attack that killed two people in the city of Izmir and the justice minister said on Friday there was no doubt Kurdish militants were responsible.

Militants clashed with police and detonated a car bomb outside the main courthouse in Turkey’s third largest city, located on its western Aegean coast, on Thursday after their vehicle was stopped at a checkpoint. A police officer and a court employee were killed. Nine other people were wounded.

The incident again highlighted the deterioration in Turkey’s public security, coming soon after a gunman killed 39 New Year’s revelers inside a popular Istanbul nightclub. Islamic State militants claimed responsibility for that attack.

Authorities said it was clear from weapons seized by police that militants had planned a much bigger attack in Izmir but it was thwarted when security forces spotted their vehicle as it approached the courthouse.

Speaking on Friday at the funeral of the slain police officer, Justice Minister Bekir Bozdag said the two assailants, shot dead by police, had been identified and efforts were under way to find their accomplices. Police had detained 18 people.

“All the information we have obtained show it was the PKK (Kurdistan Workers Party) terrorist organization who gave instructions for the attack and that the terrorists were from the PKK,” he said. There was no immediate claim of responsibility for the attack.

On Friday, security police took up guard near the courthouse as hundreds of people filed in for the funeral. Thursday’s explosion shattered windows in a nearby cafeteria and scattered rubble across the steps to the courthouse entrance.

Hundreds in Izmir’s main Alsancak square protested over the attack, holding up banners that read, “We are not afraid.”

The PKK - designated a terrorist organization by Turkey, the United States and European Union - and its affiliates have been carrying out increasingly deadly attacks over the past year and a half, ever further from the largely Kurdish southeast, where they have waged an insurgency since 1984.

Izmir, a liberal city on Turkey’s Aegean seacoast, had largely escaped the PKK and Islamist militant violence that has scarred Istanbul and the capital Ankara in recent months.

Turkey, a NATO member, is part of the U.S.-led coalition fighting Islamic State militants in Syria.