Yayha Jammeh, who ruled Gambia for 22 years, finally buckled to intense diplomatic pressure and the threat of military intervention, saying he would step down.
Mr Jammeh’s decision to quit, delivered in the early hours of the morning on state television, marks the tiny west African country’s first democratic transition since it won independence from Britain in 1965.
It brings to an end days of tense negotiations during which regional leaders warned the unpredictable leader that if he did not go voluntarily they would remove him by force. Adama Barrow, who won December’s election and who was sworn in in neighbouring Senegal on Thursday, is expected to return to Banjul shortly.
Mr Jammeh said he had to decided to go to avoid bloodshed, saying it had been an honour “to serve” his great country. "I have decided today in good conscience to relinquish the mantle of leadership of this great nation with infinite gratitude to all Gambians," he said. He gave no details of where he would be living, though he is widely expected to go into exile .
Alpha Condé, president of Guinea, was leading the west African delegation whose mission was to persuade Mr Jammeh to leave the country for exile. Some 7,000 troops organised by the Economic Community of West African States, a 15-member regional bloc, would have moved on Banjul to capture or kill him.
Senegalese troops, part of the force, crossed into the small west African nation on Thursday — the same day that Mr Barrow, who has the support of Ecowas and the African Union, was sworn in.
In the prosaically named suburb of Pipeline on the outskirts of Banjul, an extended family sat on the floor and perched excitedly on sofas in front of a giant flatscreen television to watch as their new president took his oath of office.
“We don’t need Jammeh no more,” said rap artist and video producer “Mo Hawk”, one of those who had gathered to watch the inauguration.
“We never needed him anyway,” he added dismissively.
Mr Hawk, whose real name is Mohamed Kah, has recently posted a song on YouTube on the theme of “Gambia Has Decided”, the hashtag of choice for those protesting against Mr Jammeh’s refusal to go.
Its lyrics include the lines: “The people are tired of torturing, killing and jail. Let’s come and clean up the palace.”
Excitement about driving out Mr Jammeh goes well beyond Gambia.
When the unpredictable president, who seized power in 1994 and who said he might rule for “a billion years”, initially accepted defeat, Thabo Mbeki, the former president of South Africa, said the whole continent was applauding.
West African leaders have been widely praised for the concerted diplomatic effort, backed by the threat of force, that they have made to ensure Mr Jammeh abides by the election result.
The prospect of him being toppled as a result of the ballot box has upended a Gambian society that has, for years, lived in fear.
Two decades of Mr Jammeh’s oppressive rule and a lack of economic prospects are the main reasons so many Gambians make the perilous journey to Europe in search of a better life. Last year, Fatim Jawara, the 19-year-old goalkeeper of the national football team, drowned in the Mediterranean trying to reach Italy.
Mr Jammeh became increasingly isolated as many of those who followed him through fear, loyalty or just for the money and power, have deserted him. On Wednesday, Isatou Njie-Saidy, his long-serving vice-president, suddenly upped and left.
Shortly before Mr Barrow’s inauguration, Edward Gomez, Mr Jammeh’s lawyer, who earlier in the week had been furiously filing petitions to keep his boss in power, suddenly popped up on Senegalese television exhorting the president to quit.
“I’m not judging you, no. I’m not criticising you, no. I’m just begging you in the name of Allah,” he said.
Get alerts on Gambia when a new story is published