Mali's interim president and premier have been released, a military official said Thursday, three days after they were detained and then stripped of their powers in what appeared to be the country's second coup in nine months.
Their release met a key demand of the international community, but fell far short of other calls for an immediate return to civilian government.
"The interim president and prime minister were released overnight around 1:30 am (0130 GMT). We were true to our word," the official told AFP, speaking on condition of anonymity.
Family members confirmed that President Bah Ndaw and Prime Minister Moctar Ouane had been freed.
The two men have returned to their homes in the capital Bamako, those close to them said, although the circumstances surrounding their release were unclear.
The transitional leaders had been tasked with steering the return to civilian rule after a coup last August that toppled Mali's elected president, Ibrahim Boubacar Keita.
Keita was forced out by young army officers following mass protests over perceived corruption and his failure to quell a bloody jihadist insurgency.
But in a move that sparked widespread diplomatic anger, Ndaw and Ouane were detained on Monday by army officers who were apparently disgruntled by a government reshuffle.
The two were held at the Kati military camp around 15 kilometres (nine miles) from Bamako.
The interim government -- installed under the threat of regional sanctions -- has the declared aim of restoring full civilian rule within 18 months.
But its appointments were heavily influenced by the military.
Colonel Assimi Goita, who headed the post-coup junta, was named vice president and other key posts were given to army officers.
On Tuesday, Goita said Ndaw and Ouane had been stripped of their powers.
The following day, the pair resigned in the presence of mediators visiting the base at Kati as diplomatic pressure began to mount.
The UN Security Council, staging an emergency meeting at the request of former colonial power France and others, demanded "the safe, immediate and unconditional release" of the duo and urged a restoration of the civilian-led transition.
But Goita told the mediators that he intended to head the transitional government himself and name a prime minister, diplomats said.
The Security Council did not discuss imposing sanctions and refrained from calling the detentions a coup.
In contrast, French President Emmanuel Macron, whose country has committed more than 5,000 troops to fighting jihadism in the Sahel, said the twin arrests were a "coup d'etat in an unacceptable coup d'etat".
France, the United States and the regional bloc ECOWAS have also warned of sanctions, and US aid to the Malian armed forces has been suspended.
Thousands of people have died, and hundreds of thousands have fled their homes, since a jihadist revolt began in northern Mali in 2012, later spread to the centre of the country and then into neighbouring Niger and Burkina Faso.
Mali is one of the poorest in the world, and its armed forces suffer from lack of equipment and training. They are being supported by UN and French troops, as well as a combined force from four other Sahel nations.