Banjul - Gambian leader Yahya Jammeh said on Saturday he would step down to keep peace in his country after 22 years in power, following last-chance talks with west African leaders before a military intervention.Jammeh spent hours with Guinea and Mauritania's presidents on Friday in Banjul, where agreement was reached that he would hand power to Adama Barrow, the declared winner of elections last month."I have decided today in good conscience to relinquish the mantle of leadership of this great nation with infinite gratitude to all Gambians," Jammeh said in a statement broadcast on state television.The leader declared his decision to leave office - after weeks of stalling through threats and legal action - was his alone, despite immense pressure from the international community.However, agreement was not reached on where he would spend his life after his presidency."My decision today was not dictated by anything else than the supreme interest of you the Gambian people and our dear country," Jammeh said in his speech, thanking Gambians for their support.No future plans mentioned "At a time when we are witnessing trouble and fears in other parts of Africa and the world the peace and security of the Gambia is our collective heritage which we must jealously guard and defend," he added.His actions will be carefully monitored in the hours and days after the declaration, as he has said once before he would step down and recognise Barrow as the winner, just after the election.Troops from five African nations are stationed on the tiny west African nation's borders in the event Jammeh does not keep his word, and it was thought Conde would stay into Saturday to iron out remaining disagreements.The Gambian strongman did not mention any future plans in the state television address, meaning these details may have yet to be decided."Jammeh has accepted he will leave power. The discussions revolve around where he will live in exile and the conditions around that," a Mauritanian source close to the delegation in Banjul told AFP.A highly-placed Guinean source said the country of exile had to be far enough away to stop Jammeh interfering in his country's affairs.The Guinean source mentioned Equatorial Guinea as a possible option, while diplomats discussed the possibility of Morocco.Isatou Touray, a top official in Barrow's coalition, told AFP there was "no deal yet" late on Friday,Last ditch attempt Aziz and Conde met at Jammeh's seat of power, State House, and the three men observed Friday prayers together at a nearby mosque, while Barrow prayed with Senegalese ally President Macky Sall in Dakar.Barrow, who was sworn in at The Gambia's embassy in Dakar on Thursday, will take over from Jammeh as soon as his safety can be guaranteed.The new president hailed a "victory of the Gambian nation" and demanded loyalty from his armed forces in his swearing-in speech.Jammeh's actions sparked a major political crisis that has sent Gambians and tourists -- vital for the tiny country's economy - fleeing.A Banjul-based diplomatic source told AFP the final deal would be "a joint statement between Barrow and Jammeh," but cautioned the mercurial strongman could "quite easily" change his mind.That source spoke of a three-day grace period for Jammeh with foreign troops on standby until he definitively quits the country.An imminent military operation, dubbed operation "Restore Democracy", was suspended late Thursday to allow the final push to convince Jammeh to leave.Shifting loyaltiesAs white flags reportedly flew from Gambian army posts in the countryside, sources suggested there was a gradual acceptance of Barrow, even among units known for loyalty to Jammeh.A diplomatic source said a faction had "switched sides" among the elite Republican Guards who assure Jammeh's personal protection, following meetings among themselves at their Bakau barracks close to Banjul.Gambia's army chief Ousman Badjie said foreign troops would be welcomed "with a cup of tea" rather than gunfire if they intervene to ensure Jammeh stands down."Why should we fight?", said Badjie, a former Jammeh loyalist."This is a political misunderstanding. There is no military solution to a political problem, let me tell you. We are not fools. I love my soldiers. I love the Gambian people. Nobody is going to be hurt here."Cabinet dissolved Police chief Yankuba Sonko and customs boss Momat Cham also swore allegiance to Barrow, a government source who asked not to be identified told AFP.After a string of ministerial resignations this week, Jammeh however appeared determined to stand his ground to the last, announcing he was dissolving the government and taking over.The uncertainty has continued to push Gambians to flee the country and the United Nations refugee agency said around 45 000 had left so far, more than 75 percent of them children, mostly accompanied by women."They are staying with family members, host families or in hotels. Some families are hosting up to 40 to 50 people and will soon need support as they may quickly run out of resources," a United Nations High Commissioner for Refugees (UNHCR) report said.