Gambia's President Adama Barrow has taken the oath of office in neighbouring Senegal, calling for international support as troops from regional forces entered the small West African country to ensure he assumes power.
Longtime ruler Yahya Jammeh, who came to power in a 1994 coup, has refused to step down despite losing a disputed December 1 presidential election, deepening a political crisis.
Barrow, who had recently sought shelter in Senegal, was inaugurated on Thursday in a hastily-arranged ceremony at Gambia's embassy in the Senegalese capital, Dakar.
"This is a day no Gambian will ever forget in a lifetime," Barrow said in a speech immediately after being sworn in.
Shortly after his inauguration, the United Nations Security Council unanimously adopted a resolution backing Barrow and called for a peaceful transer of power.
"The people of The Gambia spoke clearly at the elections in December. They chose Adama Barrow to be their president. Their voice now needs to be heard and their will needs to be heeded by just one man," Peter Wilson, the UK deputy ambassador to the UN, said.
The council's decision came as the Senegalese and Nigerian armies said they were deploying troops to Gambia as part of an operation by ECOWAS, West Africa's regional bloc, aiming to uphold the result of last month's vote.
"The Nigerian military will deploy its assets as part of (a) standby force to protect the people of the Gambia and maintain sub regional peace and security," Nigeria's armed forces said in a statement.
Earlier this week, Jammeh had declared a national state of emergency, while the parliament extended his term in office by 90 days. He has not been heard from since his mandate expired at midnight.
At least 26,000 people have fled Gambia for Senegal since the start of the crisis fearing unrest, the UN's refugee agency UNHCR said on Wednesday, citing Senegalese government figures.
In Dakar, the small embassy room held about 40 people, including Senegal's prime minister, the head of Gambia's electoral commission and officials from ECOWAS.
In his inauguration speech, Barrow called ECOWAS, the African Union and United Nations to "support the government and people of the Gambia in enforcing their will".
He also ordered Gambia's armed forces to remain in their barracks and called for "allegiance to the motherland".
Al Jazeera's Nicolas Haque, reporting from Dakar, said large crowds of young people had gathered outside the embassy shouting "freedom" and "hope".
"People who have spent their entire life under one leadership, one person, and they see in Barrow an opportunity for change".
Haque added, however, that the "situation is still precarious. As we understand, Jammeh is not ready to let go off Gambia; he is still in charge at least in the capital, Banjul."
Hundreds of West African soldiers have deployed to the Gambian border to back Barrow in a showdown with Jammeh.
Senegal's army had said on Wednesday it would be ready to cross into its smaller neighbour, which it surrounds, from midnight.
"A military operation [is under way] with troops also from Ghana, Nigeria, Togo, Mali - they are all at the Senegale border and presenting a united front," Haque said earlier on Thursday.
Also on Thursday, sources told Al Jazeera that Isatou Njie Saidy, Gambia's vice president since 1997, had quit, becoming the highest level official to abandon Jammeh's camp.
"Saidy's resignation comes a series with defections among Jammeh's entourage," Haque said.
"Eight cabinet members have resigned saying they no longer stand with Jammeh. But despite all these defections, Jammeh is still not willing to leave office."
Jammeh, whose mandate expired at midnight, had initially conceded defeat but a week later contested the poll's results stating irregularities.
Jammeh has resisted strong international pressure for him to step down, but African nations began stepping away from him, with Botswana announcing on Thursday it no longer recognised him as Gambia's president.
Jammeh's refusal to hand over power "undermines the ongoing efforts to consolidate democracy and good governance" in Gambia and Africa in general, it said.
Earlier this month, the African Union announced that it would no longer recognise Jammeh once his mandate expired.