An Istanbul court on Friday freed 35 prisoners from detention as part of a campaign to reduce overcrowding in the country’s prisons, the state-run Anadolu Agency reported. The agency said the prisoners included seven rights activists, five of whom are members of a pro-Kurdish movement calling for greater autonomy in Turkey.

The president, Recep Tayyip Erdogan, has recently placed the focus on prison reform as a tool of political change. According to Turkish news reports, the government wants to reduce the number of people arrested in relation to a failed coup last July to between 1,500 and 2,000. A court has ruled that 8,098 suspects should be freed.

But a large number of members of the Islamic government remain incarcerated and members of Turkey’s pro-Kurdish movement are among them. The detainees are awaiting trial on terror-related charges relating to the Gezi Park protests of 2013.

Turkey also released 451 prisoners a day after a vote to raise prison capacity brought Turkish jails over the maximum number of inmates for the first time in years. On Friday, the Turkish Justice Ministry said it had begun to move half of those who were released from prison to high-security psychiatric facilities, according to The Washington Post. Those released on Friday would be moved to the psychiatric units in May, the ministry said.

Rights groups and opposition politicians said the move would leave those freed in another state where they face increased threat of violence.

“These decisions will deprive the detainees of both the legal and safety protections that prisons offer,” Aysegul Yildirim, a coordinator of the Turkish Helsinki Committee, a non-governmental organization focused on human rights, told The Washington Post. “We have serious fears that this move will increase the risk of further torture and mistreatment in such facilities.”

The Dutch-based organisation Amnesty International condemned the government’s decision to free some prisoners without condition. “It’s clearly a step backwards in the fight against torture, which leads to a deeper rather than a shorter prison sentence for those who are accused of committing torture,” Teresa Garcia Morales, director of the group’s Eastern Europe, Central Asia and Turkey program, told the European Broadcasting Union in a Friday interview.

The government also said it would move 2,200 prisoners to other regions from Istanbul, where the overcrowding is the worst in the country. The jail in Istanbul has 1,363 inmates, according to the Turkish Human Rights Foundation.

The country has about 100,000 inmates – nearly 60 percent of whom are women – compared with roughly 60,000 in 2005, according to The Washington Post. The jail conditions are likened to those in Rwanda.

“Nearly 40 percent of the inmates in Turkish prisons are in solitary confinement, more than twice the World Health Organization’s recommended limit, and 100 inmates die in jail every day, often from overcrowding,” the Committee to Protect Journalists said in a 2016 report.

Erdogan has promised to rid prisons of radicals and Islamist supporters who he believes are terrorizing the country, the BBC reported.

But human rights advocates charge that Turkey’s mass detention targets those with little to no chance of arguing against the charges against them. In its report, the Committee to Protect Journalists said Turkish prosecutors have provided no evidence that the activists were involved in terrorist activities or that they supported Turkey’s Kurdish political movement.

“The regime is treating these detainees as enemies, which simply does not occur in the criminal justice system,” said Emma Sinclair-Webb, Turkey researcher for Human Rights Watch. “Those remanded are not terrorists; what they do is rights activism.”

Hundreds of those detained have been released on bail.

Erdogan says the detainees’ release is justified by an alleged increase in the number of terror attacks. The government says 39 people were killed in extremist attacks last month alone.

“Political prisoners are a part of terror,” Erdogan said during a televised event last month, according to Turkey’s state-run news agency. “Terrorism has paralyzed Turkey.”

Even so, Istanbul is the site of multiple attempted terrorist attacks each year.

“The government’s line and judiciary’s decisions regarding terrorists has changed drastically as the government is able to borrow money from international market since the attempted coup,” Sinan Ulgen, a former Turkish diplomat and deputy chairman of the Istanbul-based Center for Economics and Foreign Policy Studies, told The Washington Post on Friday. “The way they are expanding the prisons is if they want to continue financing the Turkish state.”