Ethiopian Prime Minister Hailemariam Desalegn on March 17, 2016. (Michael Tewelde/AP)

Ethiopia's prime minister stunned the country Wednesday by announcing plans to release imprisoned politicians and close a notorious detention center as he seeks to promote political dialogue.

It is a bold move for this U.S. ally and bulwark of regional stability that has repeatedly been criticized for its heavy-handed treatment of the opposition. Ethiopia has been plagued by years of ethnic unrest as well as rising differences within the ruling coalition.

At a news conference with leaders of the four parties making up the ruling coalition, Prime Minister Hailemariam Desalegn said that some members of political parties under prosecution will be released and that those convicted will be pardoned based on an assessment "to establish a national consensus and widen the political sphere," according to a statement released by his office.

The Maekelawi detention center in downtown Addis Ababa will be closed and turned into a museum, the statement added. The opposition has long demanded the closure of the prison while also calling for the release of prominent opposition figures held in detention.

"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 describes itself as democratic.

Human Rights Watch and other rights groups have alleged torture and other violations at Ethio­pian detention centers, and there was cautious optimism that the announcement might represent a shift.

"Time will tell whether this signals a turning point in the government's tolerance of dissenting voices, but the release of political prisoners and closure of such an abusive detention facility is welcome news," said Felix Horne, senior Ethiopia researcher at Human Rights Watch.

The government has been under extreme pressure since members of the Oromo community, the country's largest ethnic group, launched protests in 2015 over what they called their marginalization and lack of political influence. The deaths of at least 1,000 people and attacks on foreign businesses prompted a 10-month state of emergency that ended in August.

The United States has repeatedly expressed concern about the violence and the government ­response.

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

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

The government has been holding a dialogue with opposition parties. But most of the parties were seen by many as too close to the government, and some prominent politicians, including 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 now responding to this and so are going in a different direction."

The decision on Wednesday came after 18 days of talks within the ruling Ethio­pian People's Revolutionary Democratic Front coalition, which 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.

Analyst Seyoum Teshome, who was imprisoned for some time, said that it was a good first step but that 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."