The US Congress has certified Joe Biden’s victory in the presidential election, hours after Trump supporters stormed the building in an attack that saw four people die.
Lawmakers resumed the session after police managed to remove the mob, which had been encouraged by President Trump in a bid to overturn his defeat.
The certification clears the way for Mr Biden to be sworn in on 20 January.
Joe Biden’s victory was confirmed in the early hours of Thursday by a joint session presided over by Vice-President Mike Pence, who said the violence had been a “dark day in the history of the United States Capitol”.
Wednesday’s chaotic scenes followed months of escalating rhetoric around the 3 November election, and culminated with the invasion of the Capitol.
Mr Biden blasted the “insurrection” as Mr Trump, while telling the mob to “go home”, continued to make false claims of electoral fraud. His Twitter and Facebook accounts were later frozen.
Mr Biden’s victory was certified after objections by some Republican lawmakers to overturn the result in Arizona and Pennsylvania were rejected.
Shortly afterwards, Mr Trump said in a statement: “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.”
The rampage came as two Democrats won Senate seats in elections in Georgia, which shifted the balance of Congress to their party’s effective political control, aiding the passage of Mr Biden’s agenda after he is inaugurated on 20 January.
One woman was shot by police, while three others died as a result of “medical emergencies”, officials said.
Washington DC Mayor Muriel Bowser said the woman was part of a group of individuals that forced entry into the House room, which was still in session. They were confronted by plainclothes officers, and an officer pulled out a weapon and fired it.
The woman was taken to hospital and proclaimed dead. She has not been officially named, but local media identified her as San Diego-area US Air Force veteran and Trump supporter Ashli Babbit.
Officials said the three other deaths included one woman and two men, but details of how they died have not been made public.
At least 14 members of the police were injured during the unrest.
Protesters surged up the Capitol steps at about 14:15 local time (19:15 GMT), shoving past barricades and officers in riot gear to penetrate the building.
The action was targeting the joint session of Congress being held to certify Mr Biden’s election victory on 3 November.
The invasion sent members of Congress scrambling for cover under their seats as tear gas was fired.
They shouted and waved pro-Trump and US flags as they roamed the halls, demanding the results of the presidential election be overturned.
Several thousand National Guard troops, FBI agents and US Secret Service were deployed to help overwhelmed Capitol police.
Two pipe bombs were recovered, one from the Democratic National Committee offices, not far from the Capitol, and one from the nearby Republican National Committee headquarters.
Image copyright EPA A supporter of US President Donald Trump sits at the desk of US House Speaker Nancy Pelosi
Image caption After sitting at the desk of US House Speaker Nancy Pelosi, one protester leaves a message reading “we will not back down”
The occupation of the Capitol lasted more than three hours before the building was secured by law enforcement. But there was little sign the protesters were heeding Mr Trump’s call to go home, despite a citywide curfew declared by the city mayor from 18:00 to 06:00.
So far, more than 52 people have been arrested – 47 of them for curfew violations.
There were also protests on Wednesday at state legislatures in Kansas, Georgia, Utah and on the other side of the country in Oregon and the north-western state of Washington.
A deadly day and Trump’s legacy. This is how the Trump presidency ends. Not with a whimper, but with a bang.
For weeks, Donald Trump had been pointing to 6 January as a day of reckoning. It was when he told his supporters to come to Washington DC, and challenge Congress – and Vice-President Mike Pence – to discard the results of November’s election and keep the presidency in his hands.
Crisis can bring political opportunity, and there are many politicians who will not hesitate to use it to gain advantage.
Donald Trump – for now – is still in power. And while he may be chastened, he may be sitting in the White House residence watching television temporarily without his social media outlet, he will not be silent for long.
And once he decamps for his new Florida home, he could begin making plans to settle scores and, perhaps, someday return to power and rebuild a legacy that, for the moment, lies in tatters.
Democrat Mr Biden, who defeated the Republican president in November’s White House election, said the protesters’ activity “borders on sedition” and that democracy was “under unprecedented assault”.
“To storm the Capitol, to smash windows, to occupy offices on the floor of the United States Senate, rummaging through desks, on the House of Representatives, threatening the safety of duly elected officials. It’s not protest; it’s insurrection.”
The scenes of chaos at the Capitol do not reflect a true America, do not represent who we are
Mr Trump responded to the action in a recorded video on Twitter, repeating his unproven claims of election fraud.
“I know your pain. I know you’re hurt,” he said. “We had an election that was stolen from us. It was a landslide election, and everyone knows it, especially the other side. But you have to go home now. We have to have peace.”
The people who still believe Trump won
Can rebel Republicans overturn the election?
What is the electoral college?
For the first time, Twitter froze Mr Trump’s account, saying it would be locked for 12 hours. The social media giant demanded he delete three tweets that it said could stoke violence and threatening “permanent suspension”. Facebook and Instagram followed suit.
Earlier on Wednesday, Mr Trump addressed a “Save America Rally” outside the White House, when he urged supporters to head to the Capitol. “Our country has had enough and we will not take it anymore,” he said.
Political figures across the world condemned the storming of the US Capitol.
Former President Barack Obama said history would rightly remember the assault on the Capitol as “as a moment of great dishonour and shame for our nation”.
And former US President George W Bush said: “It is a sickening & heartbreaking sight. This is how election results are disputed in a banana republic – not our democratic republic.”
What has been happening in Congress?
For days Mr Trump had been piling pressure on his vice-president, who was presiding over the session, to block certification of the result. But in a letter to Congress on Wednesday, Mr Pence said he had no “unilateral authority to decide which electoral votes should be counted”.
Senate Republican leader Mitch McConnell also definitively broke with Mr Trump in an emotional speech from the chamber floor, saying: “If this election were overturned by mere allegations from the losing side, our democracy would enter a death spiral.”
After the session resumed, Senate Democratic leader Chuck Schumer blasted the mob at the Capitol as “rioters and insurrectionists, goons and thugs, domestic terrorists”, saying the president “bears a great deal of the blame”.
Senator Kelly Loeffler, who lost her bid for election in Georgia’s vote on Tuesday, said she could no longer in good conscience vote against certification as she had originally planned, citing the “abhorrent” invasion of the Capitol.