St. Louis' first black chief prosecutor is accusing the city, the local police union and others of a "racially motivated conspiracy" to prevent her from doing her job, invoking a rarely used federal law — passed after the Civil War to weaken the Ku Klux Klan — to wage a legal battle against her opponents.

St. Louis Circuit Attorney Kim Gardner filed a federal lawsuit Monday outlining how she was elected in 2016 to "redress the scourge of historical inequality and rebuild trust" among communities of color. But she alleges that the city's "unprecedented appointment" of a special prosecutor in 2018 — part of a wider investigation into then-Gov. Eric Greitens — underscores a pattern of "collusive conduct" that she believes has undermined her authority.

Decisions were made, according to the suit, "to thwart and impede her efforts to establish equal treatment under law for all St. Louis citizens at every turn; to remove her from the position to which she was duly elected — by any means necessary — and perhaps to show her successor what happens to Circuit Attorneys who dare to stand up for the equal rights of racial minorities in St. Louis."

The suit seeks punitive damages and for a judge to stop the defendants from "violating Gardner's civil rights."

The city views the allegations as "meritless," said Jacob Long, a spokesman for Mayor Lyda Krewson. He added that the city "fully expects to be vindicated once this case is adjudicated in a court of law."

Gardner's suit comes amid a broader backdrop of mistrust between minority groups and law enforcement — tensions that for decades have defined this blue-collar city of more than 300,000, which is split fairly evenly between black and white residents. (St. Louis has seen its black population fall in recent years, according to the most recent census data, long dragged down by the effects of racial residential segregation and higher rates of poverty and unemployment compared to whites.)

Gardner cites violations of the Constitution and the Ku Klux Klan Act of 1871 as the impetus behind her complaint. The anti-Klan act was part of a series of stringent federal laws used to diminish white supremacists and that codified the protection of African Americans after the Civil War and prohibited discrimination for voting and other rights.

"The Ku Klux Klan Act was adopted to address precisely this scenario: a racially motivated conspiracy to deny the civil rights of racial minorities by obstructing a government official's efforts to ensure equal justice under law for all," the suit says. "The stakes are high. This case cries out for federal enforcement."

But the anti-Klan act itself is rarely used against an employer in a workplace setting, and Gardner's application of it could prove to be an "uphill battle," said Michael H. LeRoy, a law professor at the University of Illinois at Urbana-Champaign.

The criminal provision of the law was struck down in the 1880s, LeRoy said, while its use in civil settings has been significantly cut back and become more limited.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"The act is meant to provide a civil remedy against racial conspiracies," he added. "A successful plaintiff has to show that a conspiracy is based on intent to injure somebody based on his or her race. But conspiracies are hard to prove."

The law has also been cited following the Unite the Right rally in Charlottesville, Virginia, in 2017, when alt-right and white nationalist groups faced off with counterprotesters, resulting in one death. One protester filed a lawsuit against the rally's organizers claiming conspiratorial activity had caused violence against minorities.

The defendants in that case have argued that they are covered by the First Amendment, and a trial is scheduled for October.

LeRoy said bringing up such an arcane law dating back nearly 150 years is meaningful for today, and indicates how the "stark and overt racism of the 1860s and '70s has reappeared."

Gardner, in her complaint, referred to St. Louis' "history of invidious racial animus," and noted that while the commissioner of the Metropolitan Police Department, John Hayden Jr., is African American, the top brass and the department itself remain majority white. Meanwhile, black drivers are "overrepresented" in the number of traffic stops.

She also mentioned how St. Louis was rocked last year after a national research group, the Plain View Project, released a report that studied thousands of Facebook posts from several jurisdictions around the country and found St. Louis officers among those who had apparently engaged in racist and anti-Muslim posts online.

At the time, Gardner added nearly two dozen officers to a list of those banned from bringing forth cases to her office as result of the "underlying bias" related to the posts. Two officers were subsequently fired.

Jeffrey Roorda, a business manager for the St. Louis Police Officer's Association who is also named in Gardner's lawsuit, slammed Gardner's actions last year as "nothing more than a grand distraction."

Gardner's latest suit accuses the union of going "out of its way to support white officers accused of perpetrating acts of violence and excessive force" against black residents.

In an interview with NBC affiliate KSDK on Monday, Roorda minimized the suit as "the last act of a desperate woman."

He again accused Gardner of trying to distract from the problems associated with her office, and said her conduct has only been an "impediment" to helping the community smooth over relations with police.

"When she got elected to office she decided that she wanted to persecute cops instead of prosecuting criminals," Roorda added.

Gardner has attracted criticism previously. In 2018, she hired a former FBI agent, William Tisaby, instead of working with police when she began investigating Greitens, who took office as governor a year earlier. Greitens, a rising star in the Republican Party, later resigned amid allegations of sexual misconduct.

St. Louis police began their own investigation into alleged perjury and evidence tampering regarding Tisaby's probe of Greitens. The city employed a special prosecutor, Gerard Carmody, to lead its investigation, and the case is ongoing.

While Gardner has not been accused of committing any crimes related to the Tisaby investigation, she has named Carmody as a defendant in her suit and questioned his impartiality because of his lifelong friendship with the head of Greitens' defense team.

Carmody did not return a request for comment Tuesday.

Gardner's suit also claims the Police Officers Association has been trying to stymie any reforms she has attempted to make in St. Louis. She said she pushed for the use of independent investigations for officer-involved shootings, but her idea was defeated during an alderman committee meeting in March 2018 in large part because the union opposed it.

Jerryl Christmas, a St. Louis defense attorney and former assistant circuit attorney in the city, said Gardner's willingness to take on powerful institutions should not be taken lightly and is "sending a message that the people will be heard."

"Win, lose or draw," he said, "she's highlighted the corruptness that's been going on in the city."