By Umit Ozdal

DIYARBAKIR, Turkey (Reuters) - A year after Turkey's pro-Kurdish opposition entered parliament as a party for the first time, to great fanfare about a maturing of Turkish democracy, its embattled leader is struggling to save it from banishment to the political wilderness.

President Tayyip Erdogan, who accuses the Peoples' Democratic Party (HDP) of links to Kurdish militants, signed a bill on Tuesday lifting lawmakers' immunity from prosecution and has made no secret of his desire to see HDP members indicted.

The move could see the party's parliamentary presence wiped out. Its supporters see a cynical strategy to bolster the ruling AK Party and Erdogan's chances of winning the majority he needs to change the constitution and create a presidential system.

Erdogan, meanwhile, views the HDP as the political wing of the Kurdistan Workers Party (PKK) militant group, which has waged a three-decade insurgency in the southeast, stands accused of a deadly bombing in Istanbul on Tuesday, and is considered a terrorist group by the United States and European Union.

"As we proceed towards a dictatorial regime, we will not accept being part of the trial that Erdogan desires," HDP co-leader Selahattin Demirtas told Reuters in Diyarbakir, the main city in the southeast and a heartland of HDP support.

"We will not comply with the prosecutor's invitation to give a statement in court. If they want to take us by force, that's their call," Demirtas said in an interview on Tuesday, hours after Erdogan signed the bill.

While the HDP and PKK share the same grass roots support, the political party denies direct links to the militants. Demirtas has repeatedly called for an end to the violence in the southeast since a ceasefire collapsed last July.

Prosecuting members of parliament's third-biggest party could deepen unrest in the southeast, a restive region bordering Syria where clashes between the security forces and Kurdish militants are already at their worst since the 1990s. Attacks are increasingly spilling into cities elsewhere in the country.

A car bomb ripped through a police bus in central Istanbul during the morning rush hour on Tuesday, killing 11 people and wounding dozens, in an attack which Erdogan's spokesman said appeared to have been carried out by the PKK.

Hours later, speaking at a ceremony in Diyarbakir, Demirtas condemned the bombing and said the HDP had never accepted violence as a reasonable path.

"Our party accepts tension and rivalry in the political arena but I want to once more express that we do not accept any form of violence as a means," he said.

LONG-TERM STRATEGY

Demirtas said the law approved by Erdogan, which affects 152 MPs across all four parties, was against the constitution and vowed to challenge it. The HDP fears virtually all its 59 deputies could be jailed, mostly for views they have expressed.

"We will wage a powerful struggle in both the political and legal arena," he said. "We will never abandon parliament completely to the AKP. Our seats (in parliament) were obtained by legal means, they were obtained with people's votes."

Lawmakers have until now enjoyed immunity from prosecution. The new law allows prosecutors to pursue cases against members of parliament currently under investigation, the vast majority of whom are from the HDP and main opposition secularist CHP.

Some 800 dossiers must now be sent to the courts within two weeks in order to initiate the prosecution process.

Demirtas, a charismatic former human rights lawyer, led the HDP into a parliamentary election on June 7, 2015, at which it seized enough seats to deprive the AKP, 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.

But within weeks a 2-1/2-year-old ceasefire in the southeast collapsed, with attacks by PKK militants on the security forces and Turkish air strikes on the group's camps. Demirtas accused Erdogan of taking the region back to conflict to avenge the HDP's political gains, a charge the president strongly refuted.

Last November, in a re-run of the election after efforts to form a coalition government failed, the AKP won back its majority and HDP support slipped. Erdogan cast it as a vote for stability, and a message to Kurdish insurgents that violence could not coexist with democracy.

For HDP supporters, Erdogan is now seeking to complete his mission to wipe out the party. Demirtas said any effort to arrest his parliamentarians would be illegal and unethical.

"Our stance against any arrests carried out on Erdogan's orders, political orders, will be to sit tight and fight. We'll continue to defend our principles wherever we are," he said.

(Writing by Humeyra Pamuk and Daren Butler; Editing by Nick Tattersall and Peter Millership)