Ethiopia said Wednesday it is releasing nearly 10,000 people detained under its ongoing state of emergency but plans to charge almost 2,500 others accused of destabilizing the country.

Deputy government spokesman Zadig Abraha told The Associated Press that 9,800 people were being freed. "They have been given lots of trainings ... so that they won't be part of the destructive trend that we have seen in the past," Zadig said.

This East African country declared the state of emergency in October after nearly a year of anti-government protests that human rights groups say left hundreds dead. It was some of the country's worst violence since Ethiopia's ruling party came to power in 1991. Rights groups have accused the government of using excessive force.

Most of the detainees are from the restive Oromia and Amhara regions. The government has said that under the state of emergency, people detained could be sent to rehabilitation centers without charges.

Zadig said Ethiopia has seen a "tremendous change in the peace and security" under the state of emergency, which is expected to end in April. The government already has lifted a ban on diplomats traveling more than 40 kilometers (24 miles) outside the capital, Addis Ababa.

Ethiopia, one of Africa's best-performing economies and a close security ally of the United States, was hit by a wave of protests beginning in November 2015 when ethnic Oromos protested against proposed land seizures to add to Addis Ababa city. Protesters said the plan was aimed at expanding the capital's administrative control into Oromia.

The violence then spread to the Amhara region in the country's north and beyond, with people calling on the government to end arbitrary arrests, respect regional autonomy and respect rights enshrined in the constitution.