The 75-year-old Keita and his prime minister were being held outside the capital at the Kati military barracks, while West African leaders held an emergency video conference in the aftermath of Tuesday's coup.
Col. Assimi Goita has declared himself chairman of the military junta on the state broadcaster ORTM.
“By making this intervention (the coup), we have put Mali first,” Goita said in the announcement which showed him meeting with the top officials of government ministries.
Across Africa and around the world, leaders have strongly condemned this week's coup, calling for an immediate return to civilian rule and the release of Keita and his prime minister, Boubou Cisse.
Leaders from the 14 other West African nations in the regional bloc ECOWAS held a video conference to discuss how to step up pressure on Mali's junta. Regional mediators had tried negotiating Mali's political crisis but failed to reach an agreement when the opposition made it clear they would accept nothing short of Keita's resignation.
“Today, Mali has not only descended into political chaos, but also socio-economic and security disaster with potential tragic consequences to Mali and the sub-region,” Nigerian President Muhammadu Buhari said.
Mamadou Camara, a former presidential spokesman and member of Keita's party, called Thursday for him to be released immediately.
“Let us call on the entire Malian nation to mobilize for a return to the rule of law," Camara said.
Keita and the prime minister were detained by mutinous soldiers on Tuesday who surrounded the president's private residence in Bamako and fired shots into the air. Under duress, Keita later announced his resignation on state television, saying he did not want any blood to be shed to keep him in power.
Analysts have said there were few signs that political opposition leaders were aware of the coup plot in advance, though they now stand to benefit through an opportunity to serve in the transitional government promised by the junta.
The opposition, known as the M5-RFP, announced it would hold a rally Friday in Bamako “to pay tribute to the Malian people for their heroic struggle.”
“The M5-RFP calls on ECOWAS, the African Union and the international community as a whole, to better understand the situation in Mali separate from the issue of sanctions and to support the Malian people in their quest for peace, national reconciliation, true democracy and better living,” the opposition said in a statement.
Observers fear the political upheaval will allow Islamic extremists in Mali to expand their reach. A power vacuum after a previous coup in 2012 allowed al-Qaida-linked militants to take over major towns in northern Mali where they implemented their strict interpretation of Islamic law. Former colonizer France, which maintains strong economic and political ties to Mali, later led a military intervention to oust them from power in 2013.
But those jihadists have since regrouped and launched relentless attacks on the Malian military, as well as U.N. peacekeepers and regional forces trying to stabilize the volatile country. The extremists have moved southward, inflaming tensions between ethnic groups in central Mali.
“The fight against terrorist groups is inseparable from the defense of democracy and the rule of law," French President Emmanuel Macron tweeted late Wednesday. "To separate them would be to provoke instability and weaken our fight. That is not acceptable.”
Goita, the new strongman, had been head of a special military unit based in central Mali. He also had taken part in the annual Flintlock training organized by the U.S. military to help Mali and other Sahel countries better fight extremists.
Marc-André Boisvert, a member of the U.N. panel of experts for Mali and an independent researcher on the Malian armed forces, said that was nothing unusual.
“Everybody in the armed forces who wants to become an officer and wants to progress needs foreign training," he said.
This coup appeared well-organized by a group of officers with experience in the field, he said. There was quick communication, little to no bloodshed, and statements of reassurance directed at the international community.
“It was a really smooth and well-oiled machine,” he said.
Keita, the toppled president, had won the 2013 election in a landslide, emerging from a field of more than two dozen candidates to get more than 77% of the vote. He won reelection five years later, but his political fortunes have tumbled in the past year.
While Mali’s Islamic insurgency started before Keita took office, many felt his government did not do enough to end the violence. The extremists only expanded their reach, infiltrating the central part of the country where they inflamed tensions between ethnic groups. Attacks have dramatically increased over the past year.
Opposition to Keita's government rose further after legislative elections earlier this year that dozens of candidates disputed. In a conciliatory gesture, Keita said he was open to holding the vote again in contested areas. But by June, demonstrators were taking to the streets en masse calling for his ouster.
Larson reported from Dakar, Senegal. Associated Press writers Lori Hinnant and Angela Charlton in Paris contributed.