ISTANBUL/DIYARBAKIR, Turkey (Reuters) - Turkish police detained six people including local officials from the pro-Kurdish People’s Democratic Party (HDP) on Friday in a raid on one of its Istanbul offices, days after President Tayyip Erdogan said he backed legal action against its members.

Supporters of the pro-Kurdish Peoples' Democratic Party (HDP) listen to party's co-leader Selahattin Demirtas (not pictured) during a rally to protest against security operations in the Kurdish dominated southeast, in the eastern city of Van, Turkey, January 7, 2016. REUTERS/Bedran Babat

Riot police and special forces took part in the operation, according to the state-run Anadolu Agency, which said the action was part of a crackdown on urban networks of the Kurdistan Workers Party (PKK) militant group’s youth wing.

Erdogan and the government accuse the HDP, parliament’s third-biggest party, of being an extension of the PKK, which has fought a three-decade insurgency for greater Kurdish autonomy in the southeast and which is considered a terrorist group by Turkey, the United States and the European Union.

HDP says it is opposed to violence and wants a peaceful solution for Turkey’s Kurds.

The detentions come less than 48 hours after Erdogan said some HDP lawmakers and local mayors were behaving like members of a terrorist organization and that their positions should not shield them from prosecution.

Istanbul police said in a statement that the operation was part of an investigation into a June 2015 murder suspected to have been carried out by PKK members and was based on a tip-off that the murder weapon was in the HDP building.

The predominantly Kurdish southeast has sunk into violence after a two-year ceasefire between the state and the PKK collapsed last July, reviving a conflict that has crippled the region for three decades and killed more than 40,000 people.

On Friday, one Turkish soldier was killed and five others wounded in clashes in Sur, the historic district of southeastern Diyarbakir province that has been under a police curfew for more than a month, security sources said.

Another soldier died from wounds sustained in a militant attack in the town of Cizre, near the Syrian border, the Turkish military said.

In Silopi, bordering Iraq, 58 PKK militants were captured while trying to flee, it said in a separate statement.

The shift in fighting from the countryside to urban centers has left civilians caught in the middle. According to HDP figures, 72 civilians in three southeastern towns have been killed since Dec. 14, when the latest military campaign began.

Thousands of people have left their homes in Sur. Residents complain of indiscriminate operations and round-the-clock curfews have left even the sick unable to get to hospital.

Erdogan has said 3,100 PKK members were killed in operations inside and outside the country in 2015.