By Gulsen Solaker and Ece Toksabay

ANKARA (Reuters) - The leader of Turkey's pro-Kurdish opposition accused President Tayyip Erdogan on Thursday of launching air strikes in Syria and Iraq to prevent Kurdish territorial and political gains, and of using the war against Islamic State as a cover.

Turkey launched near-simultaneous air strikes on Kurdistan Workers Party (PKK) camps in northern Iraq and Islamic State fighters in Syria last Friday, in what Prime Minister Ahmet Davutoglu has called a "synchronized fight against terror".

Western allies, including NATO and the United States, have voiced political support for Turkey's actions but several nations have also urged it not to use excessive force or to let years of peace efforts with Kurdish militants collapse.

In an interview with Reuters, Selahattin Demirtas, leader of Turkey's pro-Kurdish Peoples' Democratic Party (HDP), said the main aim of the campaign was not to combat Islamist jihadists but to prevent Kurds from unifying areas they control in Syria.

"Turkey carried out a couple of air strikes against Islamic State just for show, without causing serious damage to it, nor is Islamic State feeling serious pressure from Turkey," he said.

"Turkey's operations do not aim at taking measures against Islamic State. The main objective is to prevent the formation of a Kurdish entity in northern Syria."

Demirtas, a charismatic former human rights lawyer, led the HDP into a parliamentary election in June at which it seized enough seats to deprive the AK Party, founded by Erdogan, of a working majority for the first time in more than a decade.

The left-wing HDP gained traction after Demirtas campaigned on a progressive platform that took the party beyond its origins in Kurdish nationalism, appealing to a broader range of minorities and opponents of the Islamist-rooted AKP.

Erdogan was taking Turkey to war in revenge, Demirtas said, seeking to discredit the Kurdish movement ahead of a possible repeat election. The AKP is in talks to find a junior coalition partner, but should it fail, Erdogan could call a fresh vote at which he hopes the AKP would win back its majority.

Story continues

"The AK Party is dragging the country into a period of conflict, seeking revenge for the loss of its majority in the June election," Demirtas said.

"HDP passing the threshold and the AK Party losing its parliamentary majority are being used as a pretext for war."

The chief prosecutor's office in the mostly Kurdish province of Diyarbakir opened an investigation into Demirtas on Thursday over accusations he "provoked and armed" protesters during demonstrations in the southeast last year, local media said.

Erdogan urged parliament this week to lift the immunity from prosecution of politicians with suspected links to militants and has made his personal disdain for Demirtas clear.

"He can't take a stand against the PKK, which is recognized as a terrorist organization by Europe and the United States," Erdogan told reporters in China, when asked about Demirtas, whose brother Nurettin was imprisoned in the past and fought alongside Kurdish forces in the mountains of Iraq.

"His brother was trained in the mountains ... he would run to the mountains himself if he could find the opportunity," Erdogan said.

KURDISH GAINS IN SYRIA

Turkey's assaults on the PKK have so far been much heavier than its strikes against Islamic State, fuelling Kurdish suspicions that its real agenda is keeping Kurdish political and territorial ambitions in check, something the government denies.

Ankara is uncomfortable with the steady advance of Syrian Kurdish PYD forces, helped by U.S. air strikes, against Islamic State. Around half of Syria's 900 km (560 mile) border with Turkey is now controlled by Kurds.

Erdogan and the AKP worry that those advances will embolden Turkey's own 14 million Kurdish minority and rekindle a three-decade insurgency by the PKK, deemed a terrorist organization by Turkey, the United States and Europe.

After Ankara agreed to open its air bases to the U.S.-led coalition last week following years of reluctance, Turkey and Washington are working on plans to provide air cover for Syrian rebels and sweep Islamic State fighters from a strip of northern Syria along the Turkish border.

But the move will also ensure that territory remains out of the hands of the PYD, preventing Syria's Kurds from joining up areas under their control into what could otherwise become a strip of Kurdish land running from the Iraqi border almost to the Mediterranean.

"Erdogan stressed in the past that they would never allow the unification of Kurdish cantons in northern Syria. Jarablus is the only obstacle for this unity," Demirtas said, referring to a Syrian town on the edge of the proposed "safe zone".

Turkish officials have said the aim in Syria is to push Islamic State away from the border and their operations will not target Syrian Kurdish groups.

They say the strikes against PKK camps in northern Iraq, meanwhile, are a response to increased militant violence in recent weeks, including a series of targeted killings of police officers and soldiers blamed on the Kurdish militant group.

At least twelve members of the security forces have been killed over the past week by suspected Kurdish militants.

Erdogan initiated negotiations in 2012 to try to end the PKK insurgency, largely fought in the predominantly Kurdish southeast and which has killed 40,000 people since 1984. A ceasefire, though fragile, had been holding since March 2013.

Demirtas, whose party has been a facilitator in negotiations, said Davutoglu's calls to the PKK to lay down its arms and leave the country were "one-sided and impossible to achieve". But he said it was too early to declare the peace process over and the PKK should respect any call for a truce.

The militant group has said the air strikes are an attempt to "crush" the Kurdish political movement and create an "authoritarian, hegemonic system" in Turkey.

(Writing by Nick Tattersall; Editing by Giles Elgood)