WASHINGTON (AP) — Oath Keepers extremists were prepared to use “any means necessary” on Jan. 6, 2021, to stop the certification of Democrat Joe Biden’s electoral victory, a member of the group testified Tuesday.

The testimony from Jason Dolan came in the trial of Stewart Rhodes, the founder of the far-right militia group, and four associates facing seditious conspiracy and other charges.

Dolan, who has pleaded guilty to a conspiracy charge in the U.S. Capitol attack, is the first Oath Keepers member to take the stand as part of a cooperation deal with prosecutors as he seeks a lighter sentence in his own criminal case.

As he testified Tuesday, federal agents showed jurors the pistol and semiautomatic rifle Dolan brought with him to the Washington area. He said he and others were willing to take up arms if necessary to keep Republican President Donald Trump in office.

“It seemed to me a lot of us were prepared — I was prepared — to stop the certification process one way or the other,” Dolan said. When asked by the prosecutor how they would achieve that goal, Dolan responded: “By any means necessary. That’s why we brought our firearms.”

Dolan is the first of several Oath Keepers with cooperation deals with the government who are expected to testify in the seditious conspiracy case against Rhodes and his associates.

They are the first among hundreds of people arrested in connection with the Capitol riot to stand trial on seditious conspiracy, a rare Civil War-era charge that calls for up to 20 years behind bars. The stakes are high for the Justice Department, which last secured such a conviction at trial nearly 30 years ago.

Dolan’s testimony could undermine Rhodes’ argument that he was acting in anticipation of orders he expected from Trump — orders that never came.

Rhodes’ attorneys have said he will take the stand to argue that he believed Trump was going to invoke the Insurrection Act and call up a militia to put down what he saw as a coup. While Trump never did that, Rhodes’ lawyers say his actions should be seen not as sedition but as lobbying a president to utilize a law. The group ultimately did not use the massive stash of weapons — dubbed a “quick reaction force” and stored in a hotel room in nearby Virginia — that included weapons Dolan and others brought with them.

Dolan said he believed that if Trump had invoked the Insurrection Act, which gives the president wide discretion to decide when military force is necessary, there would have been “factions of the federal government fighting against other factions of the federal government.” But Dolan told jurors that the Oath Keepers were prepared to act no matter what Trump did.

“If the president wasn’t going to act, we would have to act,” he said.

Dolan, a 46-year-old former Marine from Wellington, Florida, pleaded guilty last year to one count of conspiracy and one count of obstruction of an official proceeding. The judge said at the time that federal sentencing guidelines call for a term of more than five years to six-and-a-half years behind bars, though prosecutors may seek less time in exchange for his cooperation.

Dolan testified that he joined the Oath Keepers in 2020, after he quit his job at a hotel to recover from a surgery that failed to fix ongoing hip problems from his military service. At the time he joined, he told the court, he was trying to numb the pain with alcohol and spending hours a day in his garage scrolling through his phone, watching videos about the 2020 election and growing angrier and more convinced of Trump’s false claims of widespread election fraud.

Rhodes’ attorneys have suggested that they will try to paint the cooperating Oath Keeper witnesses as liars who flipped under pressure by the Justice Department. Three Oath Keepers who have pleaded guilty to seditious conspiracy could also take the stand to testify against Rhodes, including a man who has said Rhodes instructed the Oath Keepers to be ready to use lethal force if necessary to keep Trump in the White House.

Dolan described how the mood of the crowd at the Capitol changed from joyful to angry when it became clear that Vice President Mike Pence was not going to hold up the certification. As the Oath Keepers approached the Capitol steps, people started calling to them and parted the way for them to pass as they stormed the building with hundreds of rioters, Dolan said.

At the time, it was gratifying to be recognized, Dolan said. Now, looking back, he said he feels much differently and wants to take responsibility for what he did. “I think I was pretty naïve, and downright stupid with some of my decisions,” he said.

On trial with Rhodes, of Granbury, Texas, are Kelly Meggs, leader of the Florida chapter of the Oath Keepers; Kenneth Harrelson, another Florida Oath Keeper; Thomas Caldwell, a retired U.S. Navy intelligence officer from Virginia; and Jessica Watkins, who led an Ohio militia group. They face several other charges as well.