Gambians awaited the departure of Yahya Jammeh to a life of exile, with some nervousness remaining over a deal reached with west African leaders that headed off a regional military intervention.
Jammeh accepted to hand power peacefully to President Adama Barrow, who is waiting in neighbouring Senegal for the strongman of 22 years to leave.
Marathon talks with Guinea's Alpha Conde and Mauritania's Mohamed Ould Abdel Aziz yielded agreement that he would go, but Conde remained in Banjul Saturday to hammer out the finer details.
The agreement "foresees the departure of Yahya Jammeh from The Gambia for an African country with guarantees for himself, his family and his relatives," Aziz said on return to Nouakchott in remarks quoted by the official AMI news agency.
Activists will be keen to see Jammeh -- who controlled certain sections of the security forces -- refused amnesty for crimes committed during his tenure, which was rife with rights abuses.
Several sources said Jammeh was likely to leave on Saturday, but so far there has been no clear agreement on where he would go, with Morocco, Equatorial Guineaand Mauritania all mentioned as possibilities by diplomats.
Jammeh's actions will be carefully monitored as he has previously agreed to step down after recognising Barrow as winner of the December 1 elections -- before completely reversing his position.
"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 on state television early Saturday.
"My decision today was not dictated by anything else than the supreme interest of you, the Gambian people and our dear country," he added, without thanking Abdel Aziz or Conde for their mediation efforts.
After a calm night in Banjul, many only heard the news on waking, and greeted his declaration with a cautious optimism, aware of the leader's mercurial nature.
"God has heard our prayers!" said Sheikh Sham, a 34-year-old metalworker from the suburb of Kanifing west of Banjul.
Mohamed Jallow, 16, said he was angry the president had allowed the political crisis to deteriorate to the point that tourists were forced into unplanned evacuations, potentially devastating an economy reliant on them for a huge chunk of gross domestic product.
"I have never known another president. We are happy that he's going but he had to he's going but he had to spoil everything before he went," he told AFP while gesturing at an empty beach.
Jammeh's refusal to leave had triggered a major political crisis, with the international community putting huge pressure on him and troops from five African nations gathering on The Gambia's borders.
Senegalese troops remained in place at the border town of Karang, an AFP journalist at the scene said, poised to intervene if Jammeh goes back on his word.
A Banjul-based diplomatic source warned Friday that 51-year-old Jammeh could "quite easily" change his mind again.
Jammeh now has a three-day grace period with foreign troops on standby until he definitively quits the country, the source said.
In a further development, army chief Ousman Badjie, a former Jammeh loyalist, had on Friday pledged allegiance to Barrow along with other top defence and security chiefs, a government source said.
"We are just waiting for him to go. One man's life is not worth a million lives. Even if I had to die myself myself, I would, so the others could enjoy," said a soldier manning a checkpoint near the airport.- Political prisoners released -
The Barrow government must now address the most immediate crises left behind by Jammeh's protracted refusal to go.
Isatou Touray, a top official in Barrow's team, said the first priority would be to help the tens of thousands who have fled in recent weeks to return safely.
"We are now trying to request humanitarian support for them to return," she told AFP on Saturday.
UN figures show around 45,000 Gambians have so far left because of the insecurity, more than three quarters of them children, mostly accompanied by women.
Some political prisoners were released overnight, she added, and will be welcomed home by their families later in the day.