Image copyright Reuters Image caption Rick Scott first celebrated his assumed victory on election night before a recount was ordered

Florida's outgoing Republican Governor Rick Scott has declared victory in a contested Senate race in the state.

The vote was subject to a recount after his lead in the 6 November ballot fell to less than 0.5%.

The final result showed Mr Scott beat three-term incumbent Democrat Senator Bill Nelson by just more than 10,000 votes from the 8.19m cast state-wide.

Republicans, including the president, had alleged voter fraud in the race and Democrats alleged voter suppression.

Lawyers representing Senator Nelson's campaign also launched legal challenges to support the recount effort, but he eventually conceded on Sunday afternoon.

Florida is a important US swing state and has a history of marginal election victories, so the knife-edge result was not a major surprise.

The tight and well-publicised race evoked memories of Florida's infamous 2000 presidential recount, which ended only after intervention from the US Supreme Court.

In a statement on his Facebook page on Sunday almost two weeks on, Mr Scott confirmed his opponent had conceded.

Image copyright EPA Image caption Crowds demanding a recount in Miami

"I just spoke with Senator Bill Nelson, who graciously conceded, and I thanked him for his years of public service," the statement said.

He concluded the message, following the protracted counting process, with: "Let's get to work."

In a tweet, President Trump congratulated Senator-elect Scott on his victory.

How did the recount come about?

In the Senate race, unofficial results revealed Mr Scott was leading Mr Nelson by just 0.15%.

Mr Scott, who claimed victory on election night, had reacted angrily to the recount, hitting out at "unethical liberals" who were trying to "steal" the election.

Mr Nelson accused Mr Scott of making "false claims" about voter fraud because he was "afraid of losing".

Florida's governor race was also subject to a recount.

Image copyright Reuters Image caption Sen. Bill Nelson (right) photographed with Senate Democratic Leader Chuck Schumer

Democrat Andrew Gillum conceded - and then withdrew his concession - after Ron DeSantis' lead for the Republicans narrowed to 0.41% in that race.

Gillum, who hoped to be Florida's first black governor, eventually conceded defeat for the second time on Saturday.

Much like in the Senate race, both candidates disagreed strongly about the need for a recount and there were protests on both sides.

What does the result mean?

Mr Scott's victory does not change things substantially, but consolidates the Republican Senate majority. They have 52 seats to the Democrats' 47 seats with only a Mississippi run-off still to go.

Mr Scott's election will be a stark change for Florida where Mr Nelson, 72, has been a fixture in politics since he was first elected to the state legislature in 1972 and then to the US Senate in 2000.

Mr Scott has already served two terms as Florida's governor - the maximum allowed by state law.

He was elected in 2010 and 2014, and before that worked in business within the US healthcare sector.

He invested $40m of his own fortune into the contest, making it one of the most expensive Senate races in US history.