ANKARA (Reuters) - A Turkish court has ordered the release of a parliamentarian who was the former spokesman for Turkey’s pro-Kurdish opposition party, a party official said on Friday.

The court ruled that Ayhan Bilgen be released after a monthly review of his detention since he was arrested in the southern city of Diyarbakir over accusations that he was a member of an armed terrorist group, the official told Reuters.

Bilgen had served as spokesman and head of the pro-Kurdish Peoples’ Democratic Party’s (HDP) parliamentary group.

The ruling comes amid growing concern among opposition parties, human rights groups and Turkey’s Western allies that President Tayyip Erdogan is using a crackdown on suspected supporters of last year’s failed coup to muzzle dissent.

Since the failed coup, some 50,000 people have been arrested and more than 150,000 sacked or suspended from the military, civil service and private sector.

Nine HDP deputies are jailed pending trial, more than 70 elected mayors from the HDP’s southeastern affiliate have been remanded in custody in terrorism-related investigations, and their municipalities taken over by state officials. Thousands of party members have also been arrested.

The Turkish government says the HDP is an affiliate of the militant Kurdistan Workers Party (PKK), which has waged a three-decade insurgency against the Turkish state and is considered a terrorist organization by Turkey, the United States and the European Union. The HDP denies direct links.

Turkey’s parliament has also stripped four HDP lawmakers, including the party’s co-chairwoman Figen Yuksekdag, of their parliamentary status, reducing the presence of the country’s third-largest party in the 550-seat assembly.

The HDP had 59 lawmakers elected to parliament in the November 2015 general election. The party’s co-leader Selahattin Demirtas has also been in jail since November 2016.

(This story corrects number of jailed deputies in paragraph 6)