A Republican congressman's Jan. 6 speech at a rally ahead of the riot at the U.S. Capitol is not covered by protections for members of Congress and federal employees, the Justice Department said in a court filing Tuesday — drawing a legal line over attempts to stop the certification of the 2020 election results.

Rep. Mo Brooks (R-Ala.) had argued that he is effectively immune from a lawsuit filed by his colleague Rep. Eric Swalwell (D-Calif.) that accused Brooks, then-President Donald Trump, and others of fomenting the failed attack on Congress.

Past court opinions and Justice Department legal interpretations have given broad safeguards to protect elected officials who are sued over their public statements. But in the case of Brooks, the Justice Department decided he went too far.

The agency “cannot conclude that Brooks was acting within the scope of his office or employment as a Member of Congress at the time of the incident out of which the claims in this case arose,” the court filing said. “Inciting or conspiring to foment a violent attack on the United States Congress is not within the scope of employment of a Representative — or any federal employee.”

The department’s legal argument concluded that Brooks’s appearance at the rally outside the White House that preceded the riot “was campaign activity, and it is no part of the business of the United States to pick sides among candidates in federal elections.” The issue will ultimately be decided by a judge or an appeals court.

During a speech at the Jan. 6 rally, Brooks told the crowd to “start taking down names and kicking ass.” He has argued that his statements were part of his work as a representative of a district where 64 percent of voters chose Donald Trump over Biden. As a federal employee, Brooks says, he has immunity from lawsuits for actions taken within the scope of his job.

Rep. Elise Stefanik (R-N.Y.) and House Minority Leader Kevin McCarthy continued to mischaracterize the events surrounding the Capitol insurrection on July 27. (Adriana Usero/The Washington Post)

In a different case, involving writer E. Jean Carroll’s defamation lawsuit against Trump, the Justice Department under President Biden has argued that Trump could not be sued in his personal capacity for denying her claim that he had sexually assaulted her.

That position infuriated Democrats. In contrast, the decision that Brooks can be sued, because his comments were so far beyond his work as a member of Congress, probably will be cheered on the left.

Swalwell, who sued Brooks in D.C. federal court, argued that his colleague was operating “in his personal capacity for his own benefit” at the rally. Philip Andonian, a lawyer for Swalwell, said Tuesday night that he “could not agree more” with the department’s analysis.

“Not only did Mo Brooks engage in unprotected campaign activity on January 6 — which his own filing makes clear — he conspired to interfere with Congress and incited a deadly insurrection that struck the very core of our democracy,” Andonian said.

Brooks said the department’s reasoning was wrong because “the law is very broad,” adding that he believes the courts will eventually side with him.

“I was not advocating anyone do anything in any campaign,” Brooks said. “If that is the standard, then everything that is done in Congress is campaigning because everything that is done in Congress affects campaigns.”

While he made general comments about voting in future elections, he said, “I didn’t ask anybody to participate in anybody’s campaign . . . [because] then you cross the line.”

U.S. District Judge Amit Mehta asked the Justice Department to weigh in on whether Swalwell can sue Brooks, or whether precedent requires the government to substitute itself for Brooks as a defendant.

Brooks had also asked for the House to intervene in the lawsuit, but earlier Tuesday the general counsel declined, saying in a letter that it was “not appropriate” to get involved in a dispute between two members.

Swalwell, a House impeachment manager and Intelligence subcommittee chairman who sits on the Judiciary and Homeland Security committees, is also suing the Trump’s son Donald Trump Jr. and attorney Rudolph W. Giuliani, neither of whom can mount a federal employee defense. Swalwell alleged that the four men made incendiary false claims at the Jan. 6 rally that led directly to the violent attack on the Capitol.

The elder Trump has not asked the Justice Department to intervene; he argues that as the former president he has “absolute immunity” from the suit.

Brooks was the first member of Congress to declare that he would challenge the electoral college count certifying Biden’s victory, setting up Jan. 6 as a focal point for those seeking to overturn the election results. He has continued to spread misinformation about the election. In response to Swalwell’s lawsuit, he again claimed Trump’s victory as well as the right and duty of Congress to decide the election.

On Jan. 6, he spoke hours before Trump, invoking bloodshed and death and asking, “Are you willing to do what it takes to fight for America?”

Brooks has argued that his speech encouraged fighting through words and votes, not physical violence — “The only thing I asked Ellipse attendees to do is chant ‘USA! USA! USA!’ ” — and that he only spoke at the rally because the White House asked him to do so.

Hundreds of people in the crowd he had told to “stop at the Capitol” overran barricades and broke into the building. Multiple people died in the chaos; two police officers who defended the building subsequently died by suicide. Members of Congress, including Brooks and Swalwell, were forced to evacuate.

More than 500 defendants have been charged with committing crimes during the riot, which authorities said resulted in assaults on nearly 140 police officers and $1.5 million in damage.