Malian President Amadou Toumani Toure fled the country on March 21 when troops stormed the presidential palace. (Pankaj Nangia/Associated Press)

A parliamentary official in Mali says the democratically elected leader of the country, who has been in hiding ever since a coup last month, has turned in his resignation.

President Amadou Toumani Touré's resignation paves the way for the head of the National Assembly, Dioncounda Traoré, to become interim president, as outlined in Mali's constitution.

Issa Togo, Traoré's chief of staff, said Sunday he had just received a phone call letting him know the president sent an emissary with a resignation letter.

The president was just months from the end of his five-year term — his second and, by law, his last — when soldiers stormed the presidential palace, toppling his government on March 21.

Late Friday, the junior officer who seized control of the country in that coup signed an accord to return the country to constitutional rule.

Capt. Amadou Haya Sanogo has been de facto leader, running the country from his office inside a military barracks since he and his men reversed more than two decades of democratic rule.

Flanked by the ministers of neighbouring countries, he read out the accord, which states that under Article 36 of Mali's constitution the head of the National Assembly becomes interim president in the event of a vacancy of power.

"In the event of the vacancy of the president of the republic for whatever reason, or due to any absolute and definitive impediment," Sanogo said, "the functions of the president of the republic will be exercised by the president of the National Assembly."

The soldiers who grabbed power claimed they did so because of President Touré's mishandling of a rebellion in the north, which began in January. Ethnic Tuareg rebels had succeeded in taking a dozen small towns and in inflicting large casualties on Mali's ill-equipped army.

However, the confusion caused by the coup in the faraway capital gave the insurgents the opening they needed to take the three largest towns in the north — Gao, Kidal and Timbuktu — which all fell last weekend.

On Friday, the Tuareg rebels declared independence for their region, which they call Azawad.