Updated at 12:02 p.m.

WASHINGTON (AP) — Congress confirmed Democrat Joe Biden as the presidential election winner before dawn Thursday after a violent mob loyal to President Donald Trump stormed the U.S. Capitol on Wednesday in a stunning attempt to overturn the election, undercut the nation’s democracy and keep Trump in the White House.

Lawmakers were resolved to complete the Electoral College tally in a display to the country, and the world, of the nation’s enduring commitment to uphold the will of the voters and the peaceful transfer of power. They pushed through the night with tensions high and the nation’s capital on alert.

Shortly before 4 a.m. Thursday, lawmakers finished their work, confirming Biden won the election.

Vice President Mike Pence, presiding over the joint session, announced the tally, 306-232.

Trump, who had repeatedly refused to concede the election, said in a statement immediately after the vote that there will be a smooth transition of power on Inauguration Day.

“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,” Trump said in a statement posted to Twitter by an aide.

The day after the siege at the Capitol, there were fresh questions and concerns across the government — about the president's fitness to remain in office for two more weeks, the ability of the police to secure the Capitol complex and the future of the Republican Party in a post-Trump era.

One Republican lawmaker publicly called for invoking the 25th Amendment to force Trump from office before Biden is inaugurated. Others said there must be a review of the U.S. Capitol Police's inability to prevent the breach of the complex by the protesters.

Most of the demonstrators were white. And newly elected Rep. Cori Bush, D-Mo., complained, “Had we as Black people did the same things that happened .... the reaction would have been different, we would have been laid out on the ground, there would have been, there would have been shootings, there would have been people in jail.”

One protester, a white woman, was shot to death by Capitol Police, and there were dozens of arrests.

During the incursion on Wednesday, the nation’s elected representatives scrambled to crouch under desks and don gas masks while police futilely tried to barricade the building in one of the most jarring scenes ever to unfold in a seat of American political power. Washington’s mayor instituted an evening curfew in an attempt to contain the violence.

The rioters were egged on by Trump, who has spent weeks falsely attacking the integrity of the election and had urged his supporters to descend on Washington to protest Congress’ formal approval of Biden’s victory. Some Republican lawmakers were in the midst of raising objections to the results on his behalf when the proceedings were abruptly halted by the mob.

Together, the protests and the GOP election objections amounted to an almost unthinkable challenge to American democracy and exposed the depths of the divisions that have coursed through the country during Trump’s four years in office. The support Trump has received for his efforts to overturn the election results have badly strained the nation’s democratic guardrails.

Congress reconvened late Wednesday, with lawmakers decrying the protests that defaced the Capitol and vowing to finish confirming the Electoral College vote for Biden’s election, even if it took all night.

Pence reopened the Senate and directly addressed the demonstrators: “You did not win.”

Republican Senate Majority Leader Mitch McConnell said the “failed insurrection” underscored lawmakers’ duty to finish the count. Democratic House Speaker Nancy Pelosi said Congress would show the world “what America is made of" with the outcome.

The president gave his supporters a boost into action Wednesday morning at a rally outside the White House, where he urged them to march to the Capitol. He spent much of the afternoon in his private dining room off the Oval Office watching scenes of the violence on television. At the urging of his staff, he reluctantly issued a pair of tweets and a taped video telling his supporters it was time to “go home in peace” — yet he still said he backed their cause.

“The president caused this,” said Rep. Adam Kinzinger, R-Ill., on Thursday.

Kinzinger said it was with a “heavy heart” that he was calling for the 25th Amendment of the Constitution to be invoked to remove Trump from office. “The president is unwell.”

On Wednesday, Twitter for the first time time locked Trump’s account, demanded that he remove tweets excusing violence and threatened “permanent suspension.”

A somber President-elect Biden, two weeks away from being inaugurated, said American democracy was “under unprecedented assault, ” a sentiment echoed by many in Congress, including some Republicans. Former President George W. Bush said he watched the events in “disbelief and dismay.”

The domed Capitol building has for centuries been the scene of protests and occasional violence. But Wednesday’s events were particularly astounding both because they unfolded at least initially with the implicit blessing of the president and because of the underlying goal of overturning the results of a free and fair presidential election.

Tensions were already running high when lawmakers gathered early Wednesday afternoon for the constitutionally mandated counting of the Electoral College results. More than 100 GOP lawmakers supported objections.

Trump spent the lead-up to the proceedings publicly hectoring Pence, who had a largely ceremonial role, to aid the effort to throw out the results. He tweeted, “Do it Mike, this is a time for extreme courage!”

But Pence, in a statement shortly before presiding, defied Trump, saying he could not claim “unilateral authority” to reject the electoral votes that make Biden president.

In the aftermath of the siege, several Republicans announced they would drop their objections to the election, including Sen. Kelly Loeffler, R-Ga., who lost her bid for reelection Tuesday.

Protesters had fought past police and breached the building, shouting and waving Trump and American flags as they marched through the halls, many without masks during the COVID-19 crisis. Lawmakers were told to duck under their seats for cover and put on gas masks after tear gas was used in the Capitol Rotunda. Some House lawmakers tweeted they were sheltering in place in their offices.

Rep. Scott Peters, D-Calif., told reporters he was in the House chamber when rioters began storming it. Security officers “made us all get down, you could see that they were fending off some sort of assault."

He said they had a piece of furniture up against the door. "And they had guns pulled,” Peters said. Glass panes to a House door were shattered.

The woman who was killed was part of a crowd that was breaking down the doors to a barricaded room where armed officers stood on the other side, police said. She was shot in the chest by Capitol Police and taken to a hospital where she was pronounced dead. City police said three other people died from medical emergencies during the long protest on and around the Capitol grounds.

Staff members grabbed boxes of Electoral College votes as the evacuation took place. Otherwise, said Sen. Jeff Merkley, D-Ore., the ballots likely would have been destroyed by the protesters.

The mob’s storming of Congress prompted outrage, mostly from Democrats but from Republicans as well, as lawmakers accused Trump of fomenting the violence with his relentless falsehoods about election fraud.

“Count me out,” said Trump ally Sen. Lindsey Graham, R-S.C. “Enough is enough.”

Several suggested that Trump be prosecuted for a crime or even removed under the Constitution's 25th Amendment, which seemed unlikely two weeks from when his term expires.

“I think Donald Trump probably should be brought up on treason for something like this,” Rep. Jimmy Gomez, D-Calif., told reporters. “This is how a coup is started. And this is how democracy dies.”

Sen. Ben Sasse, R-Neb., who has at times clashed with Trump, issued a statement saying: “Lies have consequences. This violence was the inevitable and ugly outcome of the President’s addiction to constantly stoking division.”

Despite Trump’s repeated claims of voter fraud, election officials and his own former attorney general have said there were no problems on a scale that would change the outcome. All the states have certified their results as fair and accurate, by Republican and Democratic officials alike.

Punctuating their resolve, both the House and Senate soundly rejected an objection to election results from Arizona, which had been raised by Sen. Ted Cruz, R-Texas, and Rep. Paul Gosar, R-Ariz., and another from Pennsylvania brought by Sen. Josh Hawley, R-Mo., and Rep. Scott Perry, R-Pa. Still, most House Republicans supported the objections. Other objections to results from Georgia, Michigan, Nevada and Wisconsin fizzled.

The Pentagon said about 1,100 District of Columbia National Guard members were being mobilized to help support law enforcement at the Capitol. Dozens of people were arrested.

Associated Press writers Jill Colvin, Zeke Miller, Kevin Freking, Alan Fram, Matthew Daly, Ben Fox and Ashraf Khalil in Washington and Bill Barrow in Atlanta contributed to this report.