DAKAR/BANJUL (Reuters) - Gambian President Yahya Jammeh will not be allowed to remain head of state if he refuses to go after his elected term ends next month, and will face strong sanctions if he clings to power, the top U.N. official in West Africa said on Wednesday.

Gambia's President Yahya Jammeh receives a delegation of West African leaders including President John Mahama of Ghana and Nigeria's Muhammadu Buhari for a meeting on election crisis in Banjul, Gambia December 13, 2016. REUTERS/Stringer

Jammeh, who took power in a coup in 1994, initially conceded defeat in the Dec. 1 election to little-known challenger Adama Barrow, raising the prospect of an end to 22 years of autocratic rule tainted by allegations of widespread human rights abuses.

But in a dramatic about-face that drew international condemnation, he then rejected the voting results last Friday, and his party is now challenging the outcome at Gambia’s Supreme Court.

“For Mr. Jammeh, the end is here and under no circumstances can he continue to be president. By that time (Jan. 18), his mandate is up and he will be required to hand over to Mr. Barrow,” Mohammed Ibn Chambas, U.N. Special Representative for West Africa and the Sahel, told Reuters.

He said Jammeh would be “strongly sanctioned” if he did not step down and hand over power to Barrow, without giving details.

Chambas accompanied a delegation of presidents representing the regional bloc ECOWAS who traveled to Gambia on Tuesday but failed to reach a deal that would see Jammeh step down.

Instead, Gambian soldiers seized the headquarters of the national elections commission and sealed it off just hours before the presidents touched down in the riverside nation.

United Nations Secretary-General Ban Ki-moon said on Wednesday that the takeover was an “outrageous act of disrespect of the will of the Gambian people”.

The building in the capital Banjul remained deserted on Wednesday aside from two armed security guards. Its front gate and ground floor entrances were closed.

“No one has gone to work. I didn’t even try. No one has informed me that I can go back,” elections commission chairman Alieu Momarr Njai said on Wednesday.

The ruling Alliance for Patriotic Reorientation and Construction filed a challenge to the election result, even as the delegation held mediation meetings on Tuesday.

The court has not held a session for a year and a half, and legal experts believe that at least four new judges would need to be hired to hear Jammeh’s petition.

“We do not believe it will be heard by a credible court dedicated to ensuring the integrity of The Gambia’s democratic process,” a U.S. Embassy statement said.

Analysts have suggested that the challenge in the Supreme Court - the legal channel for resolving election disputes - could put diplomats in a difficult position.

While such disputes are relatively common in Africa, the international community generally defers to established domestic legal mechanisms for resolving them.

However, in a notable exception, U.N. troops intervened militarily alongside France to oust Ivory Coast’s then-president Laurent Gbagbo after he used the constitutional court to overturn the 2010 election victory of Alassane Ouattara.

Asked whether military intervention was an option in Gambia if mediation failed, Chambas said: “It may not be necessary. Let’s cross that bridge when we get there.”

ECOWAS leaders will discuss Gambia at a summit in Nigeria on Saturday.