Police securing the area after an explosion outside a courthouse in Izmir on 5 January Hakan Akgun/Reuters

Kurdish militant group the PKK is responsible for a gun and car-bomb attack outside a court building in the city of Izmir that resulted in the death of two people, Justice Minister Bekir Bozdag said.

Bozdag said that 18 people had been detained in connection with the attack in Turkey's third-largest city, on its western Aegean coast, Reuters has reported.

A police officer and court employee were killed in the attack, and two of the attackers were killed in a gun battle with security services. Police are searching for a third attacker, reported the state-run news agency Anadolu.

The attack highlighted the precarious security situation in the country, which has been targeted both by Kurdish militant group the TAK, an offshoot of the PKK, as well as Islamic State (Isis) in recent months.

In the early hours of the new year, a man shot dead 39 people in a nightclub in Istanbul. IS claimed responsibility for the attack and Turkish police are still searching for the gunman.