Mali’s interim president and prime minister resigned on Wednesday, two days after they were arrested by the military, an aide to the vice president said, deepening a political crisis and potentially setting up a standoff with international powers.

President Bah Ndaw and Prime Minister Moctar Ouane were taken to a military base outside the capital on Monday after a Cabinet reshuffle in which two officers lost their posts.

The intervention led by Vice President Assimi Goita has jeopardised Mali’s transition back to democracy after a coup in August overthrew former President Ibrahim Boubacar Keita.

It has provoked international condemnation and raised fears that apolitical crisis in Bamako could affect regional security.

Goita, a colonel, also orchestrated last year’s coup. He has promised that elections planned for next year will go ahead.

“The president and his prime minister have resigned. Negotiations are ongoing for their liberation and the formation of a new government,” said Baba Cisse, an aide to Goita, in comments sent by the military to Reuters.

Goita has defended his actions, saying the president and prime minister had violated the transitional charter by failing to consult him about the new Cabinet.

He also accused the government of mishandling social tensions in Mali, including a strike by the main union.

France, the European Union and the United States have threatened to impose targeted sanctions over what French President Emmanuel Macron has termed “a coup within a coup”.

On Wednesday, the US State Department suspended assistance to the country’s security and defence forces and called for “the immediate and unconditional release of those detained and resumption of the civilian-led transition.”

Cisse told reporters the two leaders would be released but not immediately, due to security considerations.

Their resignations came as a delegation from the Economic Community of West African States (ECOWAS) visited Mali to press the military to back down.

During a meeting late on Tuesday with Goita, the delegation, led by former Nigerian President Goodluck Jonathan, also raised the possibility of sanctions against the officers responsible for the takeover, according to a military official who was present.

It is not clear if ECOWAS will be satisfied with a replacement president and prime minister, or if it will insist on Ndaw and Ouane being reinstated.

ECOWAS and other powers want a civilian-led transition to democracy to continue.

ECOWAS imposed sanctions, including border closures, on Mali after the coup in August before lifting them when Goita’s junta agreed to an 18-month, civilian-led transition.

Mali’s neighbours and international powers fear the crisis could further destabilise a country that Islamist groups linked to Al Qaeda and Islamic State have used as a launchpad for attacks across the region.