Hours after hundreds of President Donald Trump's supporters stormed the US Capitol in a harrowing assault on American democracy, a shaken Congress on Thursday formally certified Democrat Joe Biden's election victory.
Late on Wednesday houses of Congress resumed their work on certifying Biden's Electoral College win, with debate stretching into the early hours of Thursday.
After debate, the Senate and the House of Representatives rejected two objections to the tally and certified the final Electoral College vote with Biden receiving 306 votes and Trump 232 votes.
Vice President Mike Pence, in declaring the final vote totals behind Biden's victory, said this shall be deemed a sufficient declaration of the persons elected president and vice president of the United States.
The outcome had never been in doubt, but had been interrupted by rioters - spurred on by Trump - who forced their way past metal security barricades, broke windows and scaled walls to fight their way into the Capitol.
Police said four people died during the chaos - one from gunshot wounds and three from medical emergencies - and 52 people were arrested.
Some besieged the House of Representatives chamber while lawmakers were inside, banging on its doors and forcing suspension of the certification debate.
Security officers piled furniture against the chamber's door and drew their pistols before helping lawmakers and others escape.
The assault on the Capitol was the culmination of months of divisive and escalating rhetoric around the November 3 election, with Trump repeatedly making false claims that the vote was rigged and urging his supporters to help him overturn his loss.
The chaos unfolded after Trump addressed thousands of supporters near the White House and told them to march on the Capitol to express their anger at the voting process. He told his supporters to pressure elected officials to reject the results, urging them to fight.
According to US media reports there have been discussions among some ¬Cabinet members and Trump allies about invoking the 25th Amendment, which would allow a majority of the Cabinet to declare Trump unable to perform his duties, making Pence the acting president.