Ivory Coast's incumbent president Laurent Gbagbo was sworn in as president after his victory was rejected by world leaders but accepted by the army, raising fears of a potentially violent power struggle.

The country's election commission said opposition leader Alassane Ouattara had won a 28 November poll with 54.1% but the highest legal authority, citing alleged intimidation and vote-rigging, scrapped hundreds of thousands of votes yesterday to hand the victory to Mr Gbagbo.

World leaders, including US President Barack Obama, the head of the UN and West African regional body ECOWAS all rejected Mr Gbagbo's win and said Mr Ouattara was the winner of a poll meant to heal wounds after a decade of division.

Mr Ouattara's party has warned that denying him victory would risk throwing the country back into conflict and won the backing of former rebels still controlling the north.

But Mr Gbagbo's camp has rejected outside pressure, threatening to throw the UN's top envoy out of the country.

Amid heightened tensions and reports from residents of gunfire as night fell in some neighbourhoods of Abidjan, the head of Ivory Coast's armed forces pledged allegiance to GMr bagbo.

‘We came to greet the president of the republic, to give him our respect, reiterate our readiness and allegiance and tell him that we are ready to carry out any mission that he wants to give us,’ General Philippe Mangou said on state television after being shown visiting Mr Gbagbo with other senior officers.

The hotly contested run-off was due to cap the protracted process of reunifying a country that was once West Africa's brightest economic prospect but has been split in two since rebels seized the north after a failed coup attempt in 2002.

After a relatively peaceful first round, the lead-up to the run-off reignited divisions, with Mr Ouattara winning most of the north but Mr Gbagbo saying provisional results were marred by rebel-led intimidation of his supporters in the north.

The rebels deny the charge and Mr Ouattara says the international backing shows he is the rightful president.

At least 15 people have been killed in election-related violence in the last 10 days but there are fears of more street protests in Abidjan while rebel forces in the north said they were on high alert should government forces attack them.

Donors, led by the UN, which was charged by a 2007 peace deal with certifying election results, have spent as much as $400 million on the election process.

Election observers confirmed that violence marred voting in parts of the country but said overall the vote was fair.