Trump had odds of 4-7 (implying a 62 percent chance of winning the election, according to Betfair) by 2 a.m. ET. That had shifted from earlier in the night when the president had odds of 4-6 (a 60 percent implied chance).

Democratic nominee Joe Biden was priced at 13-8 (38 percent chance of winning the election)—longer odds than the 6-4 (40 percent chance) he achieved at 9 p.m. ET.

The president reversed the odds from 2-1 (33 percent) when the first polls closed—with his chance of reelection rising to as high as 1-4 (80 percent chance) earlier in the night.

Biden reached his nadir in the betting markets with odds of 4-1 (20 percent chance) but his odds rallied with swing state Arizona and its 11 electoral votes being declared in his favour. Biden became only the second Democratic presidential candidate since 1948 to take the Republican stronghold.

A record £400m ($518m at Wednesday’s exchange rate) has been bet on the outcome of the winner, including £201m on Biden and £192m on Trump.

Betfair spokesperson Sam Rosbottom said: “In a remarkable turn of events, Trump has overtaken Biden significantly and is now in pole position, suggesting it could be a very nervous night ahead for Biden.

“The Democrats received a huge boost in an unexpected win in Arizona, strengthening Biden’s chance of victory despite Trump turning the tables to become odds-on favourite earlier in the night.

“With thousands of votes still to be counted, it remains a coin flip over who will be victorious, but for now Donald Trump is the punters’ pick.”

Professional political gambler and Betfair election expert Paul Krishnamurty said: “Those who said history would repeat itself have been proven correct.

“The presidential race will boil down to nail-biting races in Michigan, Wisconsin and Pennsylvania. Biden needs the former plus one other. He’s behind in the count but expected to make big advances once early votes are counted. It genuinely is too close to call.”

However one leading pollster cautioned against reading too much into the favorable percentage chances for Trump versus Biden.

Nate Silver, editor-in-chief of political data site FiveThirtyEight, tweeted: “With things starting to look better again for Biden in a probabilistic sense, but a lot of uncertainties and several states unlikely to be called for a while, the Fox News call in Arizona looms pretty large as a check against claims Trump might make that he’s winning.”