Gambia's president-elect says he will be sworn in to office Thursday at the Gambian embassy in neighbouring Senegal, as the country's political crisis continues.

The Facebook and Twitter accounts for Adama Barrow, run by his staff, say the inauguration will take place Thursday at 4 p.m. in the embassy in Senegal's capital, Dakar.

Barrow won the December election, but President Yahya Jammeh, in power for more than two decades, is refusing to step down, saying he does not accept the result, citing irregularities. Jammeh's mandate expired at midnight and troops from Senegal and other West African countries have positioned themselves on Gambia's border with the intention of forcing Jammeh to cede power.

Mauritania's leader made a last-ditch diplomatic effort late Wednesday, meeting with Jammeh in Banjul before flying to Senegal.

Earlier, a military commander with the Economic Community of West African States, the regional bloc best known as ECOWAS, announced that troops were positioning along Gambia's borders.

Gambia's President Yahya Jammeh, seen here at a voting station, declared a state of emergency on Tuesday, just two days before he was supposed to cede power after losing elections. (Jerome Delay/Associated Press)

"The mandate of the president is finished at midnight," declared Seydou Maiga Moro, speaking on Senegalese radio station RFM. "All the troops are already in place," he added, saying they were merely waiting to see whether Jammeh would acquiesce to international pressure to cede power to Barrow.

As midnight approached, Jammeh met with Mauritanian President Mohamed Ould Abdel Aziz to discuss the crisis. The Mauritanian leader left Gambia shortly before midnight, telling Gambia state television that "I am now less pessimistic [Jammeh] will work on a peaceful solution that is in the best interest for everyone." He then went to the meeting at the Dakar airport in Senegal, state television there reported.

Thousands leave

Thousands of Gambians have fled the country, including some former cabinet ministers who resigned in recent days. Hundreds of foreign tourists evacuated on special charter flights, though some continued to relax poolside despite the political turmoil. Gambia is a popular beach destination in winter, especially for tourists from Britain, the former colonial power.

The downtown area of the Gambian capital, Banjul, was empty late Wednesday, with all shops closed. But there was no visible military presence apart from a checkpoint at the entrance to the city.

Tourists in Banjul, Gambia, are fleeing en masse over fears a military standoff could erupt in violence. (Afolabi Sotunde/Reuters)

Tiny Gambia is surrounded by Senegal and the Atlantic Ocean. Late Wednesday, witnesses reported Senegalese soldiers deploying in the country's Kaolack region, just north of Gambia, and in the southern Senegalese region of Casamance.

In another sign of the international pressure, Nigeria confirmed a warship was heading toward Gambia for "training," and RFM radio reported that Nigerian military equipment had begun arriving in Dakar in advance of the midnight deadline. Ghana also has pledged to contribute militarily.

The regional bloc was seeking the UN Security Council's endorsement of its "all necessary measures" to remove Jammeh.

"There is a sense that the whole situation rests in the hands of one person, and it's up to that person, the outgoing president of the Gambia, to draw the right conclusions," said Sweden's UN Ambassador Olof Skoog, the current council president.

Gambian president-elect Adama Barrow, seen here on Dec. 3, is waiting to take up the reins. (Jerome Delay/Associated Press)

President says he was ordained by Allah

Jammeh, who first seized power in a 1994 coup, has insisted that his rule was ordained by Allah. He initially conceded defeat after the December vote, but after reports emerged suggesting he could face criminal charges linked to his rule, he reversed himself a week later.

He said voting irregularities invalidated the results and his party went to court seeking a new round of voting. The case has stalled because the supreme court currently has only one sitting judge.

Human rights groups have long accused Jammeh of arresting, jailing and killing political opponents, and there have been widespread fears for Barrow's safety amid the post-election turmoil.

Tensions have been so high that Barrow has remained in the Senegalese capital since last weekend, at the advice of ECOWAS mediators, who feared for his safety. He was not even able to return to Banjul for his seven-year-old son's funeral Monday after the child was fatally mauled by a dog.

The opposition vowed Wednesday to go ahead with Barrow's inauguration, though there were no signs of preparation at the Banjul stadium where it was supposed to be held. It was unclear whether Barrow would take the oath at a Gambian Embassy outside the country or if he would return.

History of oppression, persecution

As other longtime West African strongmen have died or been forced to step down in recent years, Jammeh has remained a rare exception — even launching a campaign to anoint himself "King of Gambia."

In 2007, he claimed to have developed a cure for AIDS that involved an herbal body rub and bananas. Alarming public health experts, he insisted AIDS sufferers stop taking antiretroviral medications.

People hold placards reading 'Gambia made its choice, save democracy in Gambia, save the new Gambia' during a protest in support of Gambia by Senegalese NGOs and civil rights groups in Dakar on Tuesday. (Seyllou/AFP/Getty Images)

Two years later, his government rounded up nearly 1,000 people it accused of being witches, forcing them to drink a hallucinogen that caused diarrhea and vomiting. Two people died, according to Amnesty International.

More recently, Jammeh seemed bent on increasing Gambia's isolation on the world stage. In 2013 he exited the Commonwealth, a group made up mostly of former British colonies, branding it a "neo-colonial institution."

He also issued increasingly virulent statements against sexual minorities, vowing to slit the throats of gay men and saying the LGBT acronym should stand for "leprosy, gonorrhea, bacteria and tuberculosis." And in October, Jammeh said Gambia would leave the International Criminal Court, which he dismissed as the "International Caucasian Court."