Congress formally certified Joe Biden as the next US president on Thursday, dealing a hammer blow to Donald Trump whose supporters stormed the Capitol hours earlier, triggering unprecedented scenes of mayhem in the seat of American democracy.
Lawmakers in the Senate and House of Representatives successfully beat back Republican efforts to deny Biden the electoral votes needed to win, prompting loud cheers when the certification was announced.
The affirmation of Biden's 306-232 victory over Trump in November essentially closes the door on the unparalleled and deeply controversial effort by Trump and his loyalists to overturn the results of the 2020 election.
The president immediately released a statement pledging an "orderly transition" but suggesting he would remain in frontline politics, amid speculation that he may run again in 2024.
"Even though I totally disagree with the outcome of the election, and the facts bear me out, nevertheless there will be an orderly transition on January 20th," he said.
"I have always said we would continue our fight to ensure that only legal votes were counted. While this represents the end of the greatest first term in presidential history, it's only the beginning of our fight to Make America Great Again!"
The certification came hours after a mob breached the US Capitol and sent lawmakers scrambling for safety. They were able to return hours later, shaken but determined to complete the task.
Egged on in an extraordinary rally across town by an aggrieved Trump, a flag-waving mob had broken down barricades outside the Capitol and swarmed inside, rampaging through offices and onto the usually solemn legislative floors.
Security forces fired tear gas in a four-hour operation to clear the Capitol. Police said that one woman, reportedly a female Trump partisan from southern California, was shot and killed and that three other people died in the area in circumstances that were unclear.
One Trump backer in jeans and a baseball cap was pictured propping a leg up on House Speaker Nancy Pelosi's desk, as throngs climbed onto risers set up for Biden's inauguration.
Another held a banner that read: "We the people will bring DC to its knees/We have the power."
Biden called the violence an "insurrection" and demanded that Trump immediately go on national television to tell the rioters to stand down.
"Our democracy's under unprecedented assault," Biden said in his home state of Delaware.
"This is not dissent. It's disorder. It's chaos. It borders on sedition. And it must end now."
Trump soon afterward released a video in which he called on the mob to leave but repeated his unfounded claims of election fraud.
"We have to have peace. So go home. We love you -- you're very special," he said.
In a significant new crackdown, social media companies pulled down the video on charges it aggravated violence and Twitter temporarily suspended his account, warning the tweet-loving tycoon of a permanent ban if he does not conform to rules on civic integrity.
Democracy 'death spiral'
The chaos at the Capitol came a day after Biden enjoyed a new triumph, with his Democrats projected to win two Senate seats in runoffs in Georgia -- handing the party full control of Congress and dramatically increasing Biden's ability to pass legislation, starting with new Covid-19 relief.
Historians said it was the first time that the Capitol had been taken over since 1814 when the British burned it during the War of 1812.
For more than two centuries, the joint session of Congress has been a quiet, ceremonial event that formally certifies the election winner.
But Trump urged members of his Republican Party to dispute the outcome.
Congress rejected challenges to Biden's win in Arizona and Pennsylvania. Efforts were made to challenge the counts in Georgia, Michigan, Nevada and Wisconsin, but after the mob violence Senate Republicans dropped objections to Biden's wins there, eliminating any need for debate.
Republican Senate leader Mitch McConnell, closely aligned with Trump throughout his presidency, had tried to prevent the challenges. He noted that the election results were not even close, and that dozens of courts had thrown out lawsuits alleging irregularities.
"If this election were overturned by mere allegations from the losing side, our democracy would enter a death spiral," McConnell said.
But Senator Josh Hawley, who has taken the lead on the effort and is seen as a future Republican presidential aspirant, insisted on going ahead even after the mob attack.
"Violence is not how you achieve change," the 41-year-old senator said, insisting that he wanted to offer a "lawful process" to Trump supporters to assess their unfounded claims of fraud.
Senator Mitt Romney, one of Trump's most vocal critics inside the Republican Party, pointedly said that the best way to respect voters "is to tell them the truth."
"Those who continue to support this dangerous gambit," Romney said, "will forever be seen as being complicit in an unprecedented attack against our democracy."
With Democrats already in control of the House of Representatives, there was never any chance that Congress would overturn Biden's victory.
Democratic Senator Chuck Schumer, who is set to become majority leader after Tuesday's election victories, described the violence as an attempted coup and said it would be remembered in US history much like the Japanese attack on Pearl Harbor.
"This mob was in good part President Trump's doing, incited by his words, his lies," Schumer said, adding that Trump would bear "everlasting shame."
Former president Barack Obama called the violence "a moment of great dishonor and shame for our nation."
"But we'd be kidding ourselves if we treated it as a total surprise," Obama said, adding that it was "incited" by Trump, "who has continued to baselessly lie about the outcome of a lawful election."
Former president George W. Bush also did not mince words, saying: "This is how election results are disputed in a banana republic -- not our democratic republic."