Barack Obama has been declared the winner of Florida's 29 electoral votes, ending a four-day count with a razor-thin margin.

Regardless of the outcome, Mr Obama had already clinched re-election as president on Wednesday. He now has 332 electoral votes to Republican challenger Mitt Romney's 206.

The Florida Secretary of State's Office said that with almost 100% of the vote counted, Mr Obama led his opponent 50% to 49.1%, a difference of about 74,000 votes.

That was over the 0.5% margin where a computer recount would have been automatically ordered, unless Mr Romney had waived it.

It is normal for election supervisors in Florida and other states to spend days after any election counting absentee, provisional, military and overseas ballots.

However, the election has usually already been called on election night or soon after because the winner's margin is beyond reach.

But on election night this year, it was difficult for officials - and the media - to call the presidential race in the state, in part because the margin was so close and the voting stretched into the evening.

The win gave Obama victories in eight of the nine swing states, losing only North Carolina. In addition to Florida, he won Ohio, Iowa, New Hampshire, Wisconsin, Virginia, Colorado and Nevada.

If there had been a recount, it would not have been as difficult as the lengthy one in 2000. The state no longer uses punch-card ballots, which became known for their hanging chads. All 67 counties now use optical scan ballots where voters mark their selections manually.

Republican George W Bush won the 2000 contest after the Supreme Court declared him the winner over Democrat Al Gore by just 537 votes.