United Nations peacekeepers and French soldiers stationed in the Ivory Coast were today set on a dangerous course of confrontation with forces loyal to the renegade president, Laurent Gbagbo, after he ordered them out of the country.

The UN secretary general, Ban Ki-moon, responded swiftly with a warning that violence against the 10,000-strong mission would incur serious consequences. "Any attack on UN forces will be an attack on the international community and those responsible for these actions will be held accountable," Ban said.

His warning came as Britons were advised by the Foreign Office to leave the west African country. "In view of the tense and highly uncertain security environment following the disputed presidential election … we advise against all travel to Côte d'Ivoire," the FCO stated on its website. "Due to the threat of widespread instability and violence in Abidjan and other major cities, British nationals are advised to leave Côte d'Ivoire by commercial means, if safe to do so, unless you have a pressing reason to remain."

The UN, the European Union, the former colonial power France and the African Union all endorsed the victory of Alassane Ouattara after the second round of presidential elections on 28 November. Gbagbo, in power since 2000, insisted he won the ballot and has refused to relinquish office.

Gbagbo's defiance has been backed by Ivory Coast's military forces and by the feared youth militia, the Young Patriots, but condemned by other African countries.

The UN said today it had received hundreds of reports of abductions carried out at night by men wearing military uniforms. It also said that those behind the abductions had been "accompanied by elements of the defence and security forces or militia groups".

Navanethem Pillay, the senior UN human rights official, said the "deteriorating security conditions in the country and the interference with freedom of movement of UN personnel have made it difficult to investigate the large number of human rights violations reported", in a statement released from her office in Geneva.

The UN earlier said that armed men in military uniform had fired at patrol vehicles belonging to UNOCI (UN Operation in Côte d'Ivoire) and at soldiers guarding the mission's headquarters in the capital, Abidjan, early yesterday. Ban said that two UN personnel were injured when the youth militia launched a separate attack, also yesterday, on UN observers.

Jacqueline Lohoues-Oble, a spokeswoman for Gbagbo, said on state television that Gbagbo wanted both the UN peacekeepers and the 900 French soldiers in Ivory Coast, known as the Licorne mission, to leave immediately. "UNOCI has interfered seriously in the internal affairs of Ivory Coast," she said, adding that it had shown "contempt for Ivory Coast's institutions". Gbagbo was "opposed to any renewal of their mandate [which expires at the end of the year]", she added.

Ban responded, saying there was no intention to remove peacekeepers. He said earlier that Gbagbo's de facto coup d'etat "could not stand". The UN security council is due to discuss the crisis tomorrow. "UNOCI will fulfil its mandate and will continue to monitor and document any human rights violations, incitement to hatred and violence, or attacks on UN peacekeepers," the UN statement said.

But it was unclear what action the UN and other international bodies could take to impose their will and prevent the crisis in the former French colony from escalating. Ivory Coast, wracked by civil war between 2002 and 2003, has been in turmoil since 28 November, after Gbagbo refused to accept the result of the election. Despite losing to Ouattara, a former prime minister and senior IMF official, by eight percentage points, according to independent tallies, Gbagbo had the results invalidated by the Constitutional Council, the country's highest legal body.

Ouattara is now holed up in Abidjan's lagoon-side Golf hotel guarded by about 800 UN troops and unable to leave, according to reports from the capital. Government forces fired on Ouattara's supporters when they took to the streets on Thursday, killing about 50 people.

The election winner, Ouattara, dismissed Gbagbo's ultimatum. "Mr Gbagbo doesn't represent a legitimate government, so it's not up to him to ask for the departure or otherwise of the UN forces," Meite Sindou, his spokesman, told the New York Times.

Charles Blé Goudé, the leader of the Young Patriots militia and Gbagbo's youth minister, said the UN "has showed that it is no longer a force for peace". He warned that his group might try to seize Ouattara's hotel and force him to flee the country. At a rally of several thousand in the tough and sprawling Adibjan neighbourhood of Yopougon, he called on his militia to "liberate" Ivory Coast, Reuters reported. "We will defend the sovereignty of our country," Goudé said. "We ask them [the UN] to leave our country."

He told Gbagbo's supporters: "Get ready, because from next Friday I will need you for the total liberation of Ivory Coast."

In a recent crackdown by Gbagbo, opposition newspapers have been banned and foreign broadcast media jammed. An editorial in the Fraternité Matin newspaper condemned "the unprecedented interference of the international community".

While the streets of Abidjan were reported quiet yesterday, the crisis has sparked fears that Ivory Cost could once again descend into civil war, and that the resulting instability could cause a refugee crisis through the wider region. About 4,000 people have already fled the turmoil, according to the UNHCR.

Gbagbo can call on up to 9,000 well-armed troops, plus militia. They are opposed by irregular rebel forces that continue to hold out in the north of the country and have skirmished with government forces in recent days.

France's 900 troops are remnants of a much larger contingent. But the French president, Nicolas Sarkozy, has shown no sign of ordering them to intervene, fearful perhaps of reprisals against the 15,000 French citizens living in the country.

A senior African Union mediator arrived in the capital last week. But so far, Gbagbo has ignored offers by the US and the African Union of safe conduct to another African country in return for giving up power peacefully.