DIYARBAKIR, Turkey (Reuters) - A district governor has died after a bomb attack on his office in the largely Kurdish southeast of Turkey and police have detained 30 people in the investigation, security sources said on Friday.

The YPS, a youth wing of the outlawed Kurdistan Workers Party (PKK), claimed responsibility for Thursday's attack in Mardin, according to the ANF news agency, which is close to the militant group.

Derik district governor Muhammed Fatih Safiturk was one of three people hurt in the attack, suffering second-degree burns. He died in hospital in the city of Gaziantep on Friday, having been flown there by helicopter, the Dogan news agency said.

Around 30 people, including staff from the governor's office, have been detained in connection with the attack, security sources said.

Police were looking into the possibility that explosives were hidden in a bag placed in the governor's office and detonated remotely, or were sent in a package to the office and exploded on being opened, Dogan said.

Safiturk had been given the additional responsibility in July of running the local municipality as part of moves to replace elected officials from a sister party of the pro-Kurdish Peoples' Democratic Party (HDP).

A report by the HDP on Wednesday said that more than 3 million people were under the leadership of such government-appointed trustees in around 30 municipalities.

Ankara accuses the HDP, parliament's third-biggest party, of ties to the PKK, which is fighting for autonomy in the southeast. The HDP denies any direct links and says it is working for a peaceful resolution of the conflict.

The PKK often carries out bomb and rocket attacks in the southeast, where violence has raged since a two-year-old PKK ceasefire collapsed in July last year.

Fourteen PKK militants were found dead after an air-backed Turkish military operation against them in the eastern province of Tunceli, state-run Anadolu news agency reported on Friday.

More than 40,000 people have been killed in the conflict since the PKK took up arms in 1984. It is considered a terrorist group by Turkey, the United States and the European Union.

The leaders of the HDP were jailed this month pending trial over alleged ties to the PKK, drawing strong international condemnation of the widening crackdown on dissent under President Tayyip Erdogan.

More than 36,000 people have been jailed pending trial and around 110,000 suspended or dismissed from their jobs since an attempted coup on July 15 which Ankara blames on U.S.-based cleric Fethullah Gulen and his supporters.

Pro-Kurdish politicians have been targeted in the crackdown, with 6,000 HDP members detained since the putsch, HDP spokesman Ayhan Bilgen told a news conference on Thursday. Some 2,000 of them have been remanded in custody, he said.

Six advisers of leading HDP officials were among the latest detainees on Friday, security sources said.

(Additional reporting by Gulsen Solaker; Writing by Daren Butler and Tuvan Gumrukcu; Editing by Nick Tattersall and David Dolan)