Gambia's long-serving president, who tried to cling to power despite an election loss, agreed to step down after the country's military declared Friday it was loyal to the new president, Adama Barrow.
After 22 years in power, Yahya Jammeh had come under intense pressure to leave, with Barrow sworn in Thursday with the support of West African leaders and the international community.
Jammeh, a mercurial figure who seized power in a 1994 coup and then was elected to several terms, had boasted he would rule a billion years and said only God could remove him from power. But this week his isolation became complete after Gambian military leaders declared their loyalty to Barrow, and West African troops entered the country from neighboring Senegal to put more pressure on him to accept the results of last month's election.
A Senegalese official confirmed Jammeh had agreed to depart, the Associated Press reported late Friday, while Reuters news agency cited an advisor close to Barrow confirming the news.
Mediators from a West African leadership group, Economic Community of West African States, or ECOWAS, spent much of Friday negotiating with Jammeh, after giving him until noon to depart. Two presidents, Mohamed Ould Abdel Aziz of Mauritania and Alpha Conde of Guinea, flew into the Gambian capital of Banjul on Friday and spent most of the day in talks with the ex-president to persuade him to leave.
The deadline came and went, with no movement. Gambian media reported that Jammeh made new demands during the talks, but the incoming president and ECOWAS remained firm that he must depart power Friday. But late Friday, news trickled out that Jammeh had reached a deal to leave office.
On Saturday morning, the Mauritanian president told reporters that Jammeh had agreed to step down and leave the country.
It was a major victory for West African leaders and cemented democracy in a region which is leading the continent in peaceful and democratic transfers of power.
The efforts by West African leaders to ease Jammeh from power in Gambia, a tiny county of 1.9 million in the Gambia River delta, were being closely watched in other parts of Africa, where some leaders have clung to power for decades.
Jammeh had initially accepted his defeat but changed his mind. He mounted a court challenge claiming irregularities and said he would not leave power until his case was heard in court.
Gambian army chief Ousman Badjie, told Reuters on Friday his men would not fight West African forces and that they were loyal to the new president.
"We are going to welcome them with flowers and make them a cup of tea," Badjie said. "This is a political problem. It's a misunderstanding."
The West African military intervention to pressure Jammeh to leave power was supported by the U.N. Security Council and the U.S.
ECOWAS leaders — many of them former opposition leaders who gained power through democratic elections — refused to accept Jammeh's attempts to cling to power and supported Barrow's inauguration at the Gambian embassy of neighboring Senegal.
Gambians, tired of Jammeh's repressive leadership, celebrated in the streets Thursday after news that Barrow had been sworn into office in Senegal.
Human rights groups said that Jammeh, as president, had opponents and critics arrested and jailed without trial. Barrow came to office promising an end to human rights abuses.
In mediation efforts since last month, ECOWAS has offered Jammeh immunity from prosecution and exile. It was not clear when he would leave Gambia and where he was headed.
6:15 p.m.: This article has been updated to say that Jammeh had agreed to step down and leave the country.