Ayhan Bilgen was arrested on charges of being a member of a militant group.
A Turkish court has ordered the release of a parliamentarian who was the former spokesman for Turkey's opposition Peoples' Democratic Party (HDP), 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 militant group, the official said.
Bilgen had served as spokesman and head of the Peoples' HDP's parliamentary group.
The Turkish government criticizes the HDP for not distancing itself from the militant PKK, which has waged a three-decade insurgency against the Turkish state and is considered a terrorist organisation by Ankara, the United States and the European Union.
The Bilgen ruling comes amid allegations by opposition parties, human rights groups and Turkey's Western allies that Ankara is arresting suspected supporters of last year's failed coup to muzzle dissent.
Ankara, however, deems the state of emergency that has been in place since the coup attempt to be a necessary measure to restore order in the country.
Novelist Asli Erdogan cleared to travel
Turkish authorities on Friday also returned novelist Asli Erdogan's passport, more than two months after her travel ban was lifted, her lawyer said.
Erdogan was released in December pending trial after four months in prison on charges of "terror propaganda" on account of her links to a pro-PKK newspaper.
In June, a court lifted a foreign travel ban imposed on Erdogan but she could not get her passport back because her name was still on a list of people forbidden to travel because of alleged links to "terror organisations."
Erdogan was given her passport on Thursday, her lawyer Erdal Dogan said.