WASHINGTON — Most of the Capitol was empty when the day began. The sound of footsteps echoed off the tiled floor as lawmakers, reporters, and staffers shuffled in for a day that already promised to be contentious and historic.

But what began as a furious congressional debate over the integrity of the 2020 election in Pennsylvania and other battleground states ended with lawmakers huddled on the floor of the U.S. House of Representatives, tear gas wafting through the soaring Rotunda, and attackers — American attackers — smashed their way through House and Senate chamber doors.

Security staff barricaded themselves inside the House chamber, aiming pistols through the shattered windowpanes in the doors, as the mob pressed from outside, attempting to overturn a democratic election.

Frightened lawmakers, donning protective masks, shuffled alongside armed guards as they evacuated down hallways, while Trump supporters paraded just steps away with Confederate battle flags. Someone stood a noose outside the Capitol building.

Those halls and that building — a towering symbol of government by the people — have hosted more than two centuries of divisive debates.

But nothing like what unfolded Wednesday.

“Never in a million years did I imagine that the Capitol of the United States would be taken over by a group of lawless thugs,” said Rep. Brendan Boyle (D., Pa.).

Rep. Chrissy Houlahan (D., Pa.) described the chaos in two words: “An atrocity.”

Wednesday’s proceedings began predictably at 1 p.m., but in a way that showed how even the most basic elements of American life have become divided.

A sparse collection of Democrats gathered on their side of the House, while a far larger group of House and Senate Republicans crowded together on their side, defying Speaker Nancy Pelosi, who implored them to limit the number of people on the floor amid the pandemic.

Shortly into what would normally be a routine exercise — Congress counting the Electoral College votes from each state and ensuring a peaceful transfer of power — Rep. Paul Gosar (R., Ariz.) and Sen. Ted Cruz (R., Texas) objected to accepting Arizona’s lawfully certified electors. Several dozen Republicans on the House floor gave them a standing ovation.

Rep. Madeleine Dean (D., Pa.) had arrived hours early to the joint session, preparing to push back against Republican efforts. As she edited her speech, her staff suggested she might include a reference to the unruly mobs growing outside.

» READ MORE: Trump supporters in Washington rejoice over an attack on the U.S. Capitol: ‘Today, it’s biblical.’

All day, a crowd of growing Trump supporters had swarmed on the grounds nearby while, in speeches, the president’s supporters pumped them up with lies about a stolen election and Trump urged them to march on the Capitol.

And as debate unfolded in the House, lawmakers and reporters increasingly turned their eyes from what was playing out before them and cast them down toward their phones, scrolling through increasingly fraught reports of Trump-fueled rioters threatening to breach the building and the overwhelmed police losing their battle to hold them at bay.

Worse quickly followed.

Less than an hour into the proceedings, security rushed House leadership off the floor. The tension that had pervaded the room erupted.

“This is because of you!” Rep. Dean Phillips (D., Minn.) bellowed toward the GOP.

» READ MORE: Fact-checking Trump’s false claims about Pennsylvania’s election before his supporters attacked the Capitol

Within minutes, a police commander announced the “building had been breached” by infiltrators and made it as far as the Capitol Rotunda, a short walk to the House chamber.

Security officers began shooting tear gas outside, as those inside the House chamber instructed lawmakers to get down behind their chairs and to don the “escape hoods” meant to protect them from chemical irritants.

Suddenly, the doors began to rock with what Rep. Matt Cartwright (D., Pa.) described as “loud banging.”

“It started to feel surreal at that point,” he said. Some of the police officers had clubs and other weapons that looked like tire irons, he said, adding: “They were ready to subdue people charging into the chamber.”

House members were informed moments later that shots had been fired and a hurried evacuation began. Cartwright filed out with dozens of people trying to orderly make their way down a narrow staircase to the Capitol’s subbasement and eventually the tunnels that stretch beneath it — now one of the only secure exits from the chamber.

“Move! Move!” police started shouting as the line began to back up.

Dean, with her emergency hood over her head and a disconcerted stare in her eyes, shuffled down marbled halls with the evacuees, clutching her purse in front of her chest.

“People were shouting over each other, so it’s really hard to understand what people were saying,” said U.S. Rep. Susan Wild (D., Pa.).

Wild, among the last in the line to evacuate, called her son and asked him to get his sister on the phone.

“I wasn’t anxious to let them know that I was in a dangerous situation, but I wasn’t sure what was going to happen next, and felt the need to talk to them,” she said. Later, she learned they had heard shots and breaking glass in the background.

Suddenly, before she and a group of about 20 others could get to the doors to evacuate, security ordered them back.

Loud pops followed. Some lawmakers said they heard gunshots. Rioters broke the glass to the main doors into the House chamber. And Capitol Police, with pistols drawn, quickly turned bureaus into barricades in an attempt to keep the insurrection outside.

Hiding between chairs that normally host spectators who come to watch the country’s debates unfold, Wild gripped one hand to her chest. Holding the other was Rep. Jason Crow (D., Colo.), squatting beside her and doing his best to comfort her. She worried that the police were very much outnumbered.

“I don’t know how much time elapsed,” she said. “I completely lost sense of time.”

Eventually, Capitol Police waved to lawmakers and reporters that it was safe to move out. Escorted by guards bearing handguns and rifles, they passed rioters shoved against glass doors or forced to the ground by armed Capital Security — their instinct to stop and marvel at the unprecedented scene cut short by officers shouting at them to quickly move down the stairs as attackers still roamed the building.

With chaos unfolding inside, many lawmakers who hadn’t yet made it to the Capitol before the security breach watched in stunned disbelief from outside as alarming scenes continued to play out in the building and Trump — a prolific Tweeter — said nothing about the mounting chaos for hours.

Insurrectionists stormed House office buildings and the Senate chamber, too. One sat in the Senate president’s chair. Another propped his feet onto Pelosi’s desk.

Boyle, who had been in his office across the street, hunkered down with his staff as guards ordered them to turn off the lights and hide under their desks. He spent the next several hours narrating what he was witnessing on live TV in a succession of interviews.

By 4 p.m., most of the House members had been evacuated and were sheltering in their offices in other buildings or at an undisclosed location, where some knelt in prayer as staff handed out water and bags of Goldfish.

They all waited. Hours passed. Shock and recrimination set in.

Rep. Norma Torres (D., Calif.), born in Guatemala, said it reminded her of Central America in the 1970s.

Wild described being crowded into a room with 300 other people — “many of whom are refusing to wear masks” and hurling accusations at Democrats.

“I’m very, very worried for how we will move forward after this,” she said. “How we will ever feel safe?”

Phillips, the Minnesotan who had shouted at Republicans, said that outburst reflected his feelings.

“This has been brewing for four years. And the collective dereliction of duty manifests itself in that moment for me,” said Phillips. “I hope this moment is seared into not just everybody’s memory here but our country, and we take heed of the risks of turning our heads, closing our ears, and most importantly turning off our minds.”

Rep. Tom Malinkowski (D., N.J.), a former national security adviser in the Bill Clinton administration, said, “I’ve seen this happen in countries all around the world.”

“Words matter, and I think one of our failings in this moment is that we assume that people don’t mean what they say,” he said. “It’s important that we learn this lesson: People mean what they say. They are telling us exactly who and what they are. And we have a president who has incited and encouraged an armed attack on the Capitol of the United States.”

Republicans, many of whom were quicker than Trump to condemn the violence, were not so quick to assign blame for what had happened.

Rep. Mike Kelly one of eight Pennsylvania Republicans who had planned to object to the state’s electors, said, “We look more like a banana republic right now than the United States of America.” But he rejected any suggestion that Republicans or Trump had fomented the fiasco and blamed the media instead, telling a reporter: “We know what caused this and what’s kept it boiling.”

Jeff Van Drew, the South Jersey congressman who left the Democratic Party in 2019 to throw his support behind Trump, called the scene “obviously unacceptable.” Ultimately, he said, the attack will hurt the president’s legacy.

But Van Drew stopped short of criticizing the president outright.

“He’s his own worst enemy at times,” Van Drew said.

When Trump eventually did address the mob scene in a video released online, he peppered his calls for them to go home with compliments.

“We love you,” he said. “You’re very special. I know how you feel.”

Boyle, still in his office, was irate.

“It’s people like Trump who are the cause of this, and other, quiet Republican elected officials who have quietly gone along with it every step of the way, even though they know it’s wrong,” he said.

As darkness fell, the mob was eventually ousted, the Capitol secured, and congressional leaders resumed the certification of President-elect Joe Biden’s victory just before 9 p.m., pledging to press forward even if it took all night. Law enforcement officers from multiple agencies including the FBI, some in tactical gear and carrying automatic weapons, stood outside.

Aside from the debates, the Capitol was quiet.

Staff writers Maddie Hanna, Andrew Seidman, Allison Steele, Vinny Vella, and Chris Brennan contributed to this article.