The Washington, DC city government filed suit Tuesday against two right-wing extremist groups for their role in the violent January 6 attack on the US Capitol by supporters of president Donald Trump.

The lawsuit accuses the Proud Boys, Oath Keepers and more than 30 individuals associated with the groups of "conspiring to terrorize the District of Columbia," the official name of the US capital, said city Attorney General Karl Racine.

The suit taps into a 19th century law -- used originally to take on the violent racist Ku Klux Klan -- which focuses on conspiracy to deprive others of their constitutional rights.

The law was "designed to protect our country against violent conspiracies, protect our citizens against violent conspiracies, like the attack that took place on January 6," said Racine.

"We specifically allege that these vigilantes, insurrectionists, and masters of a lawless mob, conspired against the District of Columbia, its law enforcement officers, and residents by planning, promoting and participating in the violent attack on the United States Capitol," he said.

That January 6 attack saw hundreds of Trump supporters storm the seat of the US legislature, assaulting police and forcing a halt to the joint House-Senate session meant to confirm that Democrat Joe Biden had won the November 2020 election and would become president.

The January 6 attack on the US Capitol by Trump supporters left five people dead and temporarily halted the confirmation of Joe Biden as the winner of the 2020 presidential election
The January 6 attack on the US Capitol by Trump supporters left five people dead and temporarily halted the confirmation of Joe Biden as the winner of the 2020 presidential election AFP / Joseph Prezioso

Congressional investigators are now trying to determine whether Trump and the White House may have fomented the Capitol assault.

The suit filed by Washington says the Proud Boys and Oath Keepers worked together to plan and finance the attack "motivated by a desire to overturn the legal results of the election and initiate a second term of Donald Trump's presidency."

"The result of that planning, the January 6th Attack on the Capitol, was not a protest or a rally. It was a coordinated act of domestic terrorism," the suit says.

Thirty-one alleged members of the group were singled out by the suit, including several leaders.

Most of them already face federal charges related to conspiracy, obstruction and assault for January 6.

In February, Trump, his private attorney Rudy Giuliani and the same two extremist groups were sued by senior Democratic Congressman Bennie Thompson and the NAACP rights group for the January 6 violence using the same anti-Ku Klux Klan law.