MARY CLARE JALONICK / Associated Press

Long after most other lawmakers had been rushed to safety, they were on the hard marble floor, ducking for cover.

Trapped in the gallery of the House, occupying balcony seats off-limits to the public because of COVID-19, roughly three dozen House Democrats were the last ones to leave the chamber on Jan. 6, bearing witness as the certification of a presidential election gave way to a violent insurrection.

As danger neared, and as the rioters were trying to break down the doors, they called their families. They scrambled for makeshift weapons and mentally prepared themselves to fight. Many thought they might die.

“When I looked up, I had this realization that we were trapped,” said Rep. Jason Crow, D-Colo., a former Army Ranger who served in Iraq and Afghanistan. “They had evacuated the House floor first. And they forgot about us.”

Bound together by circumstance, sharing a trauma uniquely their own, the lawmakers were both the witnesses and the victims of an unprecedented assault on American democracy. Along with a small number of staffers and members of the media, they remained in the chamber as Capitol Police strained to hold back the mob of supporters of then-President Donald Trump.

The lawmakers were finally taken to safety roughly an hour after the siege began.

Interviewed by The Associated Press before this week’s anniversary of the attack, 10 of the House members who were in the gallery talked of being deeply shaken by their experience.

Vividly they remember the loud, hornetlike buzz of their gas masks. The explosive crack of tear gas in the hallways outside. The screams of officers telling them to stay down. The thunderous beating on the doors below. Glass shattering as the rioters punched through a window. The knobs rattling ominously on the locked doors just a few feet behind them.

Most indelibly, the loud clap of a gunshot, reverberating across the cavernous chamber.

“I’ve heard a lot of gunshots in my time, and it was very clear what that was,” Crow said. “I knew that things had severely escalated.”

The shot was fired by Officer Michael Byrd and killed Ashli Babbitt, a Trump supporter trying to crawl through the broken window of a door that leads to the House chamber. Both the Justice Department and Capitol Police investigated the shooting and declined to file charges.

Their terror was compounded by knowledge of what the mob was after: stopping Congress from certifying the Electoral College votes that would make Joe Biden the 46th president. Mike Pence, as is customary for the vice president, had been presiding over the ceremony in the House where lawmakers gathered to hear the certified election results.

Trump had other ideas.

Spouting lies about election fraud that were refuted by his own Justice Department, Trump pressured Pence to reject the electors — a move that would have bucked the Constitution and thrown the House, and potentially the country, into chaos. Pence refused to do so, but Trump held a rally in Washington before the vote-counting began, telling hundreds of supporters at the Ellipse that they had to “fight like hell.”

Rep. Val Demings, D-Fla., was among those sheltering in the gallery. The former police chief in Orlando shuddered when police said there had been a “breach” of the building.

“I knew that meant that the police had somehow lost the line. And I also know, having been a former police officer, that they would have done everything in their power to hold that line to protect us,” she said.

Demings said she told a colleague sheltering with her in the gallery: “Just remember, we’re on the right side of history. If we all die today, another group will come in and certify those ballots.”

Congress reconvened that night, certifying Biden’s election victory before sunrise.

In the days after the attack, many of the lawmakers who were in the gallery started connecting on a text message chain. It quickly evolved into therapeutic group sessions and even potluck gatherings where they tried to make sense of it all. They dubbed themselves “the gallery group,” and the name stuck.

Many went on to seek therapy. Some were diagnosed with post-traumatic stress, their struggles exacerbated by the raw tensions on Capitol Hill and an increasing number of death threats. Others said they have been more traumatized by the growing tendency among Republican lawmakers, and some in the public, to downplay or ignore the violence than they were by the attack itself.

Rep. Annie Kuster, who sought treatment for post-traumatic stress, says the gallery group connects almost daily on the text message chain.

Kuster, D-N.H., was one of the first to be let out of the gallery on Jan. 6, escaping through the doors along with three other members just before the remaining lawmakers were locked inside. When Kuster’s group reached the hallway, a group of rioters was rushing toward them.

“We ducked into the elevator,” Kuster said. “And I said to this incredible policeman — I said, oh, my God, what if the elevator doors open, and they kill us? And I will never forget this moment … he said, ‘Ma’am, I am here to protect you.’ And he was there to protect our democracy.”

Eventually, Capitol Police determined the upstairs area was clear, even as insurrectionists kept trying to break through the doors below. The lawmakers and others were rushed out of the chamber and down a warren of staircases and hallways. When they left, they could see police officers holding five or six rioters flat on the ground, guns pointed at their heads.

The rioters were inches from the doors of the gallery.

When Kuster made it home two days later, she watched hours of video from the insurrection. It only compounded the trauma.

“I remember my husband coming in, and I was just sobbing,” Kuster said. “And he was holding me, saying, ‘I don’t know if this is the best thing for you to see.’”

“But we have to — we have to acknowledge the reality of what happened that day. And what’s challenging for us is that we are both victims and witnesses to the crime on our country.”