BAMAKO, Mali - West African leaders escalated pressure on Mali's ruling junta late Thursday, calling on them to allow President Ibrahim Boubacar Keita's return to power as the mutinous soldiers who overthrew him insisted his midnight resignation had been his own decision.

The junta behind Tuesday's military takeover said the 75-year-old Keita was only being held at army barracks for his own protection, and denied he had been ousted in the first place.

“There was no coup d'etat because the constitutional order is still in force,” junta spokesman Ismael Wague told The Associated Press in an interview late Thursday. “The president of the republic resigned on his own after making an analysis of the country's situation.”

Keita was last seen by Malians late Tuesday on state broadcaster ORTM where he announced his immediate resignation and the dissolution of his government and the National Assembly. His speech came just hours after mutinous soldiers had surrounded his house and fired shots into the air before detaining him and the prime minister.

Heads of state from the regional bloc known as ECOWAS late Thursday called for the mobilizing of a standby regional military force, saying Keita must be allowed to serve out the three years left in his term after this week's “coup attempt.” They warned that the junta was responsible for the safety of Keita and all other detained government officials.

The United Nations and France also urged a return to constitutional order in Mali, amid fears that Islamic extremists could once again gain ground amid the political upheaval, derailing more than seven years of effort to stabilize the country.

French President Emmanuel Macron again condemned Tuesday's coup “against a president who was democratically elected by his people.”

“We asked for him to be released as quickly as possible, and for no violence to be committed,” Macron said, speaking Thursday evening alongside German Chancellor Angela Merkel.

ECOWAS previously invoked the potential use of its standby military force in 2017 after then-Gambian President Yahya Jammeh refused to acknowledge defeat in an election. Jammeh ultimately agreed to go into exile and no military action was taken.

ECOWAS said it would soon send a delegation to Bamako to try to help restore constitutional order. The bloc already had suspended Mali's membership, closed its borders with the country and promised other financial sanctions against the junta leaders.

French, U.N. and West African partners have been trying to stabilize Mali after a similar 2012 coup created a power vacuum that allowed jihadists to seize control of northern towns until a French-led military operation the following year.

“Mali has not only descended into political chaos, but also socioeconomic and security disaster with potential tragic consequences to Mali and the sub-region,” Nigerian President Muhammadu Buhari said.

Analysts saw few signs that political opposition leaders were aware of the coup in advance, though they now stand to benefit through an opportunity to serve in the transitional government promised by the junta.

Observers fear the political upheaval will allow Islamic extremists in Mali to expand their reach once again. Wague, the junta spokesman, said the new military rulers were doing everything possible to be sure that was not the case.

“It is possible that some may take advantage of the situation to plan things, but we are in contact with the operational units on the ground so that they can continue their work,” he told AP. “We know how difficult it is for them because all of us come from the field and we will do everything we can to increase their operational capacity.”

After al-Qaida-linked militants took over the major towns in northern Mali, they implemented their strict interpretation of Islamic law, including amputating hands for those accused of theft. France, which maintains strong economic and political ties to Mali, later led the intervention to force them from power.

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 country. The extremists also have moved south, inflaming tensions between ethnic groups in central Mali.

Col. Assimi Goita, the country's 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-Andre 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.

Opposition to Keita's government rose 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.

Associated Press writer Baba Ahmed reported this story in Bamako and AP writer Krista Larson reported from Dakar, Senegal. AP writers Lori Hinnant and Angela Charlton in Paris contributed to this report.