BAMAKO, MALI -- Mali's President Ibrahim Boubacar Keita formally dissolved the constitutional court that had endorsed disputed legislative election results and also said he is willing to rerun the vote in areas where the outcomes are still contested.

Keita's latest concessions are in response to anti-government demonstrators who first began taking to the streets more than a month ago to call for him to step down, two years before his final term ends.

The president said the concessions are necessary to save the country from further unrest. Violent demonstrations in the capital last week led to the deaths of several people and wounded more than 70.

"We must go beyond ourselves and only consider Mali," the president said in a televised address late Saturday.

The president, who was elected in 2013, already had promised last week that he would dissolve the court, one of the key demands made by the protesters. But those demonstrators also want the National Assembly dissolved, a move Keita has yet to endorse.

The West African regional bloc, ECOWAS, first proposed that legislative elections be re-held in several dozen areas in Mali where candidates disputed the official results from the second round of balloting back in April. Keita indicated he would be willing to accept the recommendations of the regional bloc of 15 countries.

Thousands of protesters had marched through the streets of Bamako, the capital, on Friday, briefly occupying the state television offices. The unrest in the capital continued Saturday, when police fired tear gas on crowds that were smaller than the day before.

The June 5 Movement, or M5, is named after the day demonstrators first took to the streets in large numbers. While its leaders have backed down from earlier calls for Keita's resignation, some protesters still want the president to leave office before his term ends in 2023.

All scenarios are still possible in Mali, where the last democratically elected president was overthrown in a military coup in 2012, said Baba Dakono, a researcher and political analyst.

"It is difficult now to say whether President Ibrahim Boubacar Keita can still benefit from the support of the army," Dakono said.

Even if senior military officers are loyal to Keita's government, lower-ranking officers and army rank-and-file can be unpredictable, he said.

When Keita was elected in 2013, a French-led military operation had ousted Islamic extremists from key towns in northern Mali just months earlier. In the seven years since, though, those militants have regrouped and continue to launch deadly attacks on Malian forces despite the presence of UN peacekeepers, French troops and regional forces.

Last year was particularly deadly as hundreds of soldiers were killed in the north, forcing the military at one point to close down some of its most remote and vulnerable outposts. It prompted criticism of how Keita's government has handled the crisis. A similar wave of violence targeting Malian soldiers in the north, launched by separatist rebels, precipitated the 2012 coup that overthrew President Amadou Toumani Toure.

The coup's leader later handed over power to a transitional civilian government following international pressure, and democratic elections were then organized which Keita won.

------

Associated Press Krista Larson in Dakar, Senegal contributed.