Gambian President Yahya Jammeh will be “strongly sanctioned” if he tries to stay in power, the UN’s regional envoy, Mohammed Ibn Chambas, has said.

UN Secretary General Ban Ki-moon, along with the US, also urged the Gambian security forces to leave the country’s electoral commission office, which was seized on Tuesday.

The army could compromise “sensitive electoral material”, Mr Ban said.

Mr Jammeh initially conceded defeat to Adama Barrow before changing his mind.

Mr Ban said taking over the electoral commission building was an “outrageous act of disrespect of the will of the Gambian people and defiance towards the international community at a time when a high-level delegation was in the country to broker a peaceful transfer of power”.

The US embassy in Banjul also demanded that security forces withdraw, saying the “unnecessary and unprovoked show of force is seen as a move to subvert the democratic process”.

Tuesday also saw Mr Jammeh’s party challenge the election in the country’s supreme court.

But Mr Ibn Chambas, who visited The Gambia on Tuesday, said the legal process was separate from Mr Jammeh’s mandate as president and he had to step down when it ends on 19 January.

“For Mr Jammeh, the end is here and under no circumstances can he continue to be president,” he said.

It is also unclear how Mr Jammeh’s supreme court challenge can proceed because only one of its seven judges are in post.

Even if the court does consider the case, it is unclear whether it will reach a decision before the end of Mr Jammeh’s term in office, a spokesman for The Gambia Bar Association has said.

The head of the Gambian electoral commission, Alieu Momar Njai, has said corrected election results do not change the overall outcome and Mr Barrow was still the winner.

The UN and US intervention comes after the Nigerian, Ghanaian, Liberian and Sierra Leonean leaders on Tuesday failed to convince Mr Jammeh to hand over power.

Liberia’s President Ellen Johnson-Sirleaf said a deal was not something that could happen in a day and said a report of their discussions would be made on Saturday to a meeting of the West African grouping Ecowas.

However Mr Ibn Chambas said he did not think military intervention to force Mr Jammeh from power would be necessary, after a senior Ecowas official said that a military option would be “conceivable” if diplomacy failed.

“It may not be necessary. Let’s cross that bridge when we get there,” he said.