West African armies halted an operation in Gambia aimed at installing the country's new president, Adama Barrow, on Thursday so regional leaders could make one last attempt to convince longtime ruler Yahya Jammeh to step aside.

Barrow took the oath of office on Thursday at Gambia's embassy in Senegal, calling for international support from West Africa's ECOWAS bloc, the African Union and the United Nations.

A regional military force launched an intervention effort, dubbed Operation Restore Democracy, shortly after the former opposition figure was sworn in.

"We think that up until the last minute there is still a solution through dialogue," said Marcel de Souza, head of the ECOWAS commission, explaining the decision to suspend the advance to reporters in Dakar late on Thursday.

Inauguration abroad

In his inaugural speech, which took place under heavy security, Barrow called on Jammeh to respect the will of the people and step aside. .

A convoy of Senegalese soldiers travels toward the Gambia border near Karang, Senegal. Senegalese troops charged into neighbouring Gambia late Thursday to support Barrow. (Sylvain Cherkaoui/Associated Press)

Outside Gambia's embassy in Dakar, Baal Jaabang held up a freshly framed portrait of Barrow, already printed with the words: "His Excellency Adama Barrow, President of the Republic of Gambia."

"I'm extremely delighted, so wonderfully happy today," he said. "But now the situation risks moving into fighting. No Gambian — in the diaspora or back home — wants our country to face fighting."

Barrow had come to Senegal last week at the urging of West African mediators, who had feared for his safety amid the political crisis.

He arrived at the embassy to cheers of joy from hundreds of Gambians who had gathered, with national flags, for a glimpse of the new president.

"Our national flag will now fly high among the most democratic nations of the world," Barrow said after the ceremony.

Barrow was declared the winner of the Dec. 1 election and at first was congratulated by Jammeh in a phone call aired on state television. But once it was suggested that Jammeh could face criminal charges linked to human rights abuses during his long rule, he backtracked and challenged the vote in court, alleging irregularities.

Barrow is sworn in as president on Thursday. (RTS/Associated Press)

In recent days, Jammeh has tried to stay in power by declaring a state of emergency, while lawmakers voted to extend his mandate by three months.

Jammeh on Thursday remained at his official residence and intended to stay there, said an official close to the administration who was not authorized to speak to reporters. If the regional force is going to arrest Jammeh, it will have to be there, the official said.

Many of Jammeh's loyalists will resist, the official added.

Loyalties divided

But there were signs that some in Gambia's military might not put up a fight. One soldier with close knowledge of the situation said several barracks had indicated they would support Barrow. The soldiers spoke on condition of anonymity because they were not authorized to speak to reporters.

Gambia's army is estimated at well below 5,000 troops.

Jammeh may try to cling to power for a few more days, but he is becoming increasingly isolated, said Alex Vines, head of the Africa program at Chatham House in London.

"After the inauguration of Adama Barrow, the trickle of power flowing to him will become more of a flood," Vines said. "Jammeh clearly believes leaving Gambia in a hurry is an option — his aircraft has been on standby at Banjul airport for two weeks," he added.

African nations began stepping away from Jammeh, with Botswana announcing it no longer recognized him as Gambia's president. The African Union earlier announced that the continental body would no longer recognize Jammeh once his mandate expired.

Congratulations to Barrow began pouring in, including from British Foreign Secretary Boris Johnson, and the spokesman for UN Secretary General Antonio Guterres said the UN chief in a phone call with Barrow expressed his "full support."

Yahya Jammeh is refusing to give up the president's job even though he lost the election. (Jerome Delay/Associated Press)

Thousands have fled Gambia in recent days, including a number of former cabinet ministers who resigned.

But as news of Barrow's inauguration spread, many people hugged and cheered, chanting "New Gambia, new Gambia!"

"It's unbelievable! Today I can say anything. I am the happiest man on Earth," said Lamin Sama, a 35-year-old in Banjul. "For 22 years we couldn't say anything, we were like slaves."