The Electoral College has confirmed Joe Biden as the next U.S. president.

It formalized his November triumph in a certified state-by-state count, The Associated Press reported Tuesday.

The confirmation all but shut the door on President Donald Trump's attempts to reverse the outcome.

"The flame of democracy was lit in this nation a long time ago...not even a pandemic or an abuse of power can extinguish that flame," CNN quoted the president-elect saying.

Thanks to victories in swing states like Georgia, Arizona, Wisconsin, Pennsylvania and Michigan, Biden gained 306 college votes to Trump's 232. That was validated after electors formally cast their ballots to replace Trump on Jan. 20.

Electors gathered in states around the U.S. Monday to cast their votes. Trump tweeted of a "Rigged Election!" and "massive voter fraud."

The lawsuits filed by Trump and his allies have all been dismissed by state and federal courts.

Biden received over 81 million votes - a record and 7 million more compared with what Trump and his vice president Mike Pence received four years ago.

After the Electoral College validated the results Trump tweeted the departure of Attorney General William Barr - who had disclosed there was no widespread proof of voter irregularity in the polls, despite the outgoing president's accusations.

In a speech following the declaration, Biden said American democracy had been "pushed, tested and threatened." He criticized Trump's attempts to overturn the result and said it was time to "turn the page."

The results will be forwarded to Washington and counted in a joint session of the House on Jan. 6.