Ethiopia’s prime minister shocked the country Wednesday by announcing the release of all political prisoners and closing down a notorious detention center to promote political dialogue.

The move comes after the country has been hit by years of social unrest among its largest ethnic communities as well as rising differences within the ruling party.

At a joint news conference with leaders of the four parties making up the ruling coalition, Prime Minister Hailemariam Desalegn said “political prisoners” under prosecution will be released and those convicted will be pardoned to “improve the national consensus and widen the democratic platform,” according to the state-run Fanabc news portal. It is the first time the existence of political prisoners has been acknowledged.

The notorious Maekelawi detention center in downtown Addis Ababa will also be closed and turned into a museum, the report added. The closure of the prison and the release of the prisoners — many of them prominent opposition figures — have long been opposition demands.

“It is a time defying institution which has been around for more than half a century and has been used [and abused] for the same purpose: to detain, without due legal process, people alleged to have committed grave crimes against the state, the people and the constitution,” said a 2016 editorial in the Addis Standard. The paper described the site as a state-run “torture chamber” unbefitting a government that nominally describes itself as democratic.

The Ethiopian government has been under extreme pressure since 2015 when demonstrations erupted among the Oromo community, the country’s largest ethnic group, protesting their marginalization and the lack of political influence. At least 1,000 died and foreign businesses were attacked prompting a 10-month state of emergency that ended in August 2017.

The United States, a close political ally, has repeatedly expressed concerned about the violence and the government response and urged greater democracy.

New protests erupted in the last months in the universities and there were reports of security forces killing more people in parts of the country.

At the same time, there were clashes between the Oromo and neighboring Somali communities that claimed hundreds of lives and left hundreds of thousands displaced.

The government has been holding a dialogue with the opposition. But most of the opposition parties were seen by many as too close to the government, and some of the most prominent politicians such as Merera Gudina and Bekele Gerba were in jail.

Previously, government policy seemed aimed at tightening control rather than allowing more political voices, said Beyene Petros, chairman of the Medrek coalition of opposition parties.

“We have been pushing for this as a confidence building measure that they should release prominent political prisoners, that has been our incessant call,” he said. “I’m not sure if they are ow responding to this and so are going in a different direction.”

The decision came after 18 days of talks among the ruling coalition known as the Ethio­pian People’s Revolutionary Democratic Front, that includes parties representing the Oromo and other regions. Increasingly, these parties have become more assertive and may have been instrumental in pushing for the change.

Ethio­pian analyst Seyoum Teshome, who was imprisoned for some time, said it was a good first step but many more things had to happen to put the country back on the democratic path.

“The anti-terrorism law, the media law, all these things must be reformed,” he said. “The regime is almost losing its legitimacy . . . they need to make drastic changes in all political aspects and the constitutional democracy that has collapsed must be re-erected.”