By Bate Felix
BAMAKO (Reuters) - Mali's President Amadou Toumani Toure resigned on Sunday, paving the way for the soldiers who ousted him in a coup to stick by a deal to restore civilian rule and hand power to the president of the National Assembly.
Neighboring states meeting to discuss turmoil in Mali's north, a major reason for the military's ousting of Toure, differed over whether to crush the northern rebels, a mix of Tuareg separatists and Islamists with links to al Qaeda, or talk to them.
The twin crises - a coup in the capital that led to rebel seizure of the north - have threatened Mali's previous reputation for democracy and widened a security void that countries fear will exacerbate regional instability, terrorism and smuggling.
"We have just received the formal letter of resignation from President Amadou Toumani Toure," said Djibril Bassole, Burkina Faso's foreign minister, a leading mediator for West Africa's ECOWAS bloc.
"We will now contact the competent authorities so that the vacancy of the presidency would be established and so that they take the appropriate measures," Bassole added after Toure met mediators in an upmarket villa in central Bamako.
A Reuters journalist at the villa said Toure, who has been in hiding since the coup, was dressed in a white flowing boubou robe and matching hat, and looked relaxed after meeting mediators.
After three days of negotiations and growing international pressure to step down, Mali's junta announced late on Friday it would begin a power handover in return for an amnesty from prosecution and the lifting of trade and other sanctions.
According to the agreement signed with mediators, the junta must now make way for a unity government with Mali's parliament speaker Diouncounda Traore as interim president.
It is not clear when elections, which had been due on April 29, will be held as the north is now in the hands of a mix of separatist Tuareg-led MNLA rebels and Islamist fighters seeking to impose sharia, Islamic law, across Mali.
At a meeting of regional countries in Mauritania, Niger said on Sunday the rebels' gains should be reversed before any talks, but Algeria warned that military intervention risked further complicating the situation.
The rebels, bolstered by guns and fighters from Libya's war last year, routed Malian troops, in disarray after the coup, to carve out a zone the size of France in Mali's desert north.
The separatist National Movement for the Liberation of Azawad (MNLA) have declared an independent state of "Azawad", a move universally rejected by neighboring states and world organizations.
The group does not have control of large chunks of the territory it claims as Azawad and has an uneasy relationship with Ansar Dine, another Tuareg-led group that swept south and wants to impose sharia law.
(Additional reporting by Laurent Prieur in Nouakchott; Writing by David Lewis; Editing by Andrew Roche)