Erdogan addressed AKP supporters in Kastamonu earlier Wednesday [Reuters]

A policeman has been killed and two more wounded in an attack in a northern Turkish city, shortly after prime minister Recep Tayyip Edrogan held an election rally.

Erdogan had already left Kastamonu on Wednesday when the ambush occurred on a country road winding through thickly forested hillsides south of the city.

Attackers threw an explosive device and opened fire on a bus carrying police, Turkish network NTV said. The vehicle was accompanying a campaign bus for Erdogan's Justice and Development Party (AKP).

Addressing thousands of supporters at a rally later in Amasya, Erdogan appeared to blame separatist fighters for the attack.

"Those dark minds, these terrorists, these separatists are only able to do this, those who understand there is nothing they can do through the ballot box," Erdogan said.

Kurdish separatist fighters belonging to the Kurdistan Workers Party (PKK) have waged a decades-long campaign for Kurdish independence, mostly from the southeast of the country.

PKK fighters attacked a police vehicle in the Black Sea province of Sinop last month, injuring three police officers, but Kastamonu province had not previously been known as a scene of guerrilla violence.

Wednesday's attack came after thousands of Kurds gathered in the southeastern city of Diyarbakir for a funeral of PKK guerrillas killed in a clash with security forces in the province of Tunceli last week.

Turkey goes to the polls in parliamentary elections on June 12.

Source: Agencies