Yahya Jammeh made the announcement on national TV, saying it was “not necessary that a single drop of blood be shed”.
The statement followed hours of talks between Yahya Jammeh and West African mediators. He gave no details of what deal might have been struck.
Yahya Jammeh has led The Gambia for 22 years but was defeated in December’s election by Adama Barrow.
Adama Barrow has been in neighboring Senegal for days and was inaugurated as president in the Gambian embassy there on January 19.
Troops from several West African nations, including Senegal, have been deployed in The Gambia, threatening to drive Yahya Jammeh out of office if he did not agree to go.
Yahya Jammeh’s decision to quit came after talks with the presidents of Guinea and Mauritania.
He said: “I have decided today in good conscience to relinquish the mantle of leadership of this great nation with infinite gratitude to all Gambians.
“I promise before Allah and the entire nation that all the issues we currently face will be resolved peacefully.”
Shortly before the TV address, Mauritanian President Mohamed Ould Abdel Aziz said that a deal had been struck and that Yahya Jammeh would leave the country. He gave no further details.
Yahya Jammeh was given an ultimatum to leave office or be forced out by UN-backed troops, which expired at 16.00 GMT on January 20.
The deadline was set by the Economic Community of West African States (ECOWAS), a regional grouping backed by the UN.
Yahya Jammeh had at first accepted defeat in the election but then reversed his position and said he would not step down.
He declared a 90-day state of emergency, blaming irregularities in the electoral process.
The electoral commission accepted that some of its early results had contained errors but said they would not have affected Adama Barrow’s win.
Yahya Jammeh had vowed to stay in office until new elections were held.
Misleading allegations, rumours and outright lies about voting and fraud are flooding online spaces in…
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…