Turkey has issued a decree paving the way for the conditional release of 38,000 prisoners in an apparent move to make jail space for thousands of people who have been arrested after last month’s failed coup.

The decree allows the release of inmates who have two years or less to serve of their prison terms and makes convicts who have served half of their term eligible for parole. Some prisoners are excluded: people convicted of murder, domestic violence, sexual abuse or terrorism and other crimes against the state.

The measures would not apply for crimes committed after 1 July.

The justice minister, Bekir Bozdağ, said the move would lead to the release of 38,000 people, adding it was not a pardon or an amnesty but a conditional release of prisoners.

The government says the coup attempt on 15 July, which led to at least 270 deaths, was carried out by followers of the movement led by the US-based Muslim cleric Fethullah Gülen who have infiltrated the military and other state institutions. Gülen has denied any prior knowledge or involvement in the coup but Turkey is demanding that the US extradite him.

The Turkish government declared a state of emergency and launched a massive crackdown on Gülen’s supporters in the aftermath of the coup. About 35,000 people have been detained for questioning and more than 17,000 of them are to face trial, including soldiers, police, judges and journalists.

Tens of thousands more people with suspected links to Gülen have been suspended or dismissed from their jobs in the judiciary, media, education, healthcare, military and local government.

The crackdown has raised concerns among European countries and human rights organisations, who have urged the Turkish government to show restraint.