Turkey's pro-Kurdish party is facing a political and legal onslaught that could see it banned and its MPs jailed as President Recep Tayyip Erdogan seeks to strengthen his bid to keep power.

The pressure on the leftist Peoples' Democratic Party (HDP) -- the third-largest in parliament -- runs counter to Erdogan's stated desire to mend ties with Western allies, which are exasperated at the state of Turkey's democratic freedoms.

But it could mark the final chapter in a campaign that began when a ceasefire collapsed in 2015 between the Turkish state and Kurdish militants, who have been waging an insurgency since 1984.

Erdogan portrays the HDP as the militants' political front and thousands of its members have been arrested, despite the party's rejection of the accusations.

Those detained include two former co-chairs who were jailed in 2016 and face decades in prison. Most of the 65 HDP mayors elected in the predominantly Kurdish southeast in 2019 have been replaced by government-appointed trustees.

Recept Tayyip Erdogan portrays the HDP as a political front for militants and thousands of its members have been arrested, despite the party's rejection of the accusations
Recept Tayyip Erdogan portrays the HDP as a political front for militants and thousands of its members have been arrested, despite the party's rejection of the accusations AFP / Yasin AKGUL

The HDP's future was thrown into question when Devlet Bahceli, Erdogan's ultra-nationalist ruling alliance partner, began calling on Turkey's top courts to take action late last year.

The Court of Cassation opened an investigation into the party on March 2, two weeks after Erdogan accused Kurdish militants of killing a group of Turkish captives in Iraq during a failed rescue operation.

Parliament also began examining whether to lift the immunity of 25 lawmakers, including 20 from the HDP last month.

While Bahceli is the public face of the push to shut down the HDP, experts say Erdogan could privately see it as a way of keeping control of parliament and preserving his rule.

Pervin Buldan (R) said she expected to emerge stronger
Pervin Buldan (R) said she expected to emerge stronger AFP / BULENT KILIC

Several surveys show Erdogan's governing alliance with Bahceli losing votes as Turks suffer from a waning economy and persistently high inflation.

"The government is squeezed," said Galip Dalay of the Robert Bosch Academy and Chatham House, pointing to the opposition gaining ground "it appears, by one or two percent".

While the margin is small, it could be enough to strip Erdogan of his control of parliament in elections scheduled for 2023.

"For the government to reverse it, it's not sure what to do," Dalay said.

"If Erdogan thinks that banning the HDP will better serve his search for the winning formula, I don't think he will have any trouble in banning it."

Party officials say all 56 HDP MPs have had legal proceedings opened against them
Party officials say all 56 HDP MPs have had legal proceedings opened against them AFP / Yasin AKGUL

The shutdown of the HDP would not be a first for a pro-Kurdish party.

Previous parties closed include the People's Democracy Party (HADEP) in 2003 over alleged links to the Kurdistan Workers' Party (PKK).

The PKK is blacklisted as a terrorist organisation by Ankara and its Western allies.

The HDP strenuously denies formal links to the PKK and accuses the government of targeting the party because of its stringent opposition to Erdogan and his policies.

Party co-leader Mithat Sancar was defiant during a briefing with foreign media last week in Istanbul.

"We don't just have a plan B and C, but also a plan D. We are determined to continue our democratic fight despite the pressure," Sancar said.

HDP co-leader Pervin Buldan told AFP in a separate interview that even if the party was closed down, there would still be "many alternatives".

"In the past, our parties were always shut down, and new ones were opened, but we always came out of these experiences stronger," Buldan said.

Dalay said Erdogan was considering two options: "He's going between paralysing the HDP or totally closing it."

Erdogan has to weigh the impact of a ban since he seeks a "course correction" with the West, said Dalay, and has made several reform promises, especially on human rights.

But he must also consider Bahceli's MHP, which he needs for a majority in parliament, especially as his overtures to other right-wing opposition parties have yielded few results.

Dalay said the botched rescue operation in northern Iraq also put pressure on the Turkish government to look tough.

"(It) created another dynamic to be more heavy-handed on the HDP, on Kurdish politics in general, important to shift the focus as well," he said.

Police detained 718 people, including HDP officials, the day after the incident.

Sancar said all 56 HDP MPs have had legal proceedings opened against them, with roughly 1,000 cases against lawmakers in all since 2016.