By Tara John
Updated: January 20, 2017 7:14 AM ET | Originally published: January 19, 2017

A longtime dictator in one of Africa’s smallest countries is refusing to relinquish power, ignoring a Jan. 18 deadline set by a coalition of neighboring countries who have threatened to use military action to force his departure. Gambia is now on tenterhooks as West African troops entered Gambian territory late on Jan. 19, giving Yahya Jammeh just hours to cede power and end his 23-year-long dictatorship. Here’s how the country got here:

How did this all start?

Jammeh has held power in the former British colony of around 2 million people for 23 years, winning four consecutive elections since taking over in a 1994 military coup. He has been accused of using torture, intimidation, enforced disappearances and arbitrary arrests to preserve his rule, and Human Rights Watch questioned the fairness about the upcoming elections, alleging that similar sort of tactics were being deployed ahead of Dec. 1 elections.

The run-up to the election campaign was further blighted when 30 opposition supporters, including Ousainou Darboe, the leader of the country’s largest opposition party United Democratic Party (UDP), were jailed. Political novice Adama Barrow succeeded Darboe as UDP leader and in Oct. seven opposition parties united behind the 51-year-old, endorsing him as the main challenger against Jammeh.

Property developer Barrow galvanized Gambians by promising economic change during the buildup to December’s election. The country’s lack of job prospects has led to a brain drain, where remittences form around 20% of its GDP. It has also pushed thousands of Gambians to make the perilous journey to cross the Mediterranean in search for better prospects in Europe.

Barrow, who was a relative unknown before the election, won by a 5% margin, despite voters allegedly facing intimidation and threats from Jammeh’s thugs. In a move that surprised many, the dictator conceded on Dec. 2 to Barrow’s election win— which saw jubilant crowds flood the capital, Banjul, in celebration of what many thought would be Gambia’s first democratic transition of power.

What went wrong?

Things turned sour after members of Barrow’s coalition said that the dictator would be prosecuted for his alleged abuses once Barrow took office. Jammeh performed a U-turn and sent the country to a political crisis by calling for a fresh election and for the Supreme Court to annul the results.

On Jan. 15, it was reported Barrow, for security reasons, had moved to Senegal until his planned inauguration. On Thursday, Barrow was inaugurated at the Gambian embassy in Senegal’s capital Dakar. During his speech, he instructed Gambia’s armed forces to remain in their barracks.

But Jammeh is still refusing to relinquish power?

Yes. On Wednesday, the country’s Parliament’s voted to extend Jammeh’s term for another six months, after he issued a state of emergency. This prompted British and Dutch travel operators to evacuate hundreds of travellers from Gambia’s seaside resorts— a major source of income for the country. Jammeh remains in the State House, the presidential property in the capital, after a diplomatic effort by Mauritanian President Mohamed Abdul Aziz to persuade him to stand down failed. Diplomats, led by Guinea’s President Alpha Conde, are making a last ditch mediation effort on Friday morning.

Does Jammeh have many allies?

No. The strongman’s vice-president and eight other cabinet ministers have resigned since January while almost a dozen Gambian diplomats abroad have called for him to accept the vote. The latest ally to flee is Edward Gomez, lawyer for Jammeh’s Alliance for Patriotic Reorientation and Construction (APRC) party, who filed the petition to the Supreme Court asking it to annul the election results. Gomez wrote in a statement that he has left for Senegal, and implored the dictator to step down in order to avoid a “violent and gruesome end.”

What about internationally?

The international community wants Jammeh to go. Since December, two high-level delegations from the regional bloc known as the Economic Community of West African States [ECOWAS] — which included Liberian leader Ellen Johnson Sirleaf, Nigeria’s President Muhammadu Buhari, Sierra Leone’s leader Ernest Bai Koroma and then-outgoing Ghanaian President John Dramani Mahama— failed to convince Jammeh to leave peacefully.

“His biggest problem is he doesn’t have any friends internationally” says Alex Vines, head of the Africa programme at Chatham House. The eccentric dictator, who claims to have the ability to cure HIV with local herbs, has managed to isolate himself from not only ECOWAS and its only neighbor Senegal, Vines says, but he has also fallen out with former allies like Iran and Taiwan. “He was aligned to Taipei, and then he switched to Beijing, but Beijing is not going to lose capital to tiny Gambia,” Vines says.

In Jan. 2016 he declared Gambia an Islamic Republic, which was seen as a way to repositioning the country’s foreign relations. “He rebranded Gambia as a Islamic Republic hoping it will bring in a lot of Gulf money but that has not happened either” Vines says.

The impasse has since forced ECOWAS to issue an ultimatum to Jammeh: leave power by midnight Jan. 18 or face military action — a stance that has the full backing of the U.S., the E.U., the U.N. Security Council and the African Union.

Is a military confrontation likely?

The threat is there. For the past month, ECOWAS has been preparing a Senegal-led military force to intervene if Barrow is prevented from assuming the presidency. West African troops, who gathered on Gambia’s border on Jan. 18, entered the country on Thursday. Jammeh was given a noon, Jan. 20, deadline to leave office, or face being forced out by the UN-backed forces, BBC reports.

It remains unclear whether Jammeh will take a military stand or how Gambia’s military will fight— ECOWAS’ troops have, so far, faced no resistance. An Amnesty report suggests a split in the military ranks, as at least five members of Jammeh’s armed forces have been detained for allegedly supporting Barrow. “The Gambian military is divided along ethnic lines and it’s really unclear whether forces loyal to Jammeh will fight against ECOWAS considering how they lack the wherewithal and strength to do so,” Robin Sanders, a former US ambassador to ECOWAS, told Al Jazeera. Gambia’s military is also thought to have a mere 1,000 soldiers, compared to ECOWAS’ standby force of around 6,000 to 10,000 troops, Lucy James, a researcher on Gambia for political risk consultancy, Control Risks, tells TIME.

Fears of unrest have already caused at least 26,000 Gambians to flee into Senegal, the U.N. says. War risks a humanitarian crisis, that may see its effects on the West Africa’s regional stability as well as the shores of Europe. In the face of that, Vines believes ECOWAS won’t be too hasty to intervene. “Gambia will see a time of parallel administrations” says Vines, “but it will be resolved, at the end of the day Jammeh is isolated and will become increasingly more vulnerable after Jan. 19.”

What might happen to Jammeh?

It has been suggested that Morocco and Nigeria have offered Jammeh political asylum, but he doesn’t seem eager to take it. Nigeria gave Liberian warlord Charles Taylor political asylum in 2003 in order to end Liberia’s civil war, years later the country allowed Taylor to be extradited for war crimes— a fate that Jammeh is keen to avoid.

Contact us at editors@time.com.

SPONSORED FINANCIAL CONTENT

Read More From TIME

EDIT POST