Gambia’s President Yahya Jammeh, who for weeks had refused to step down after losing the recent election, has confirmed that he has decided to relinquish power.

“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 in a statement broadcast on state television early on Saturday.

The announcement came after hours of last-ditch talks with regional leaders and the threat by a regional military force to make him leave.

 The new president, Adama Barrow, had earlier declared that “the rule of fear” was over and that Jammeh, who ruled the country for 22 years, had agreed to leave.

Barrow was sworn in at Gambia’s embassy in Dakar in neighbouring Senegal on Thursday.