Outgoing Virginia Attorney General Mark Herring on Thursday reversed more than 50 legal opinions issued by predecessors during the Jim Crow and Massive Resistance eras that justified segregation, interracial marriage bans and other racist laws.

“Too many of my predecessors used this office to perpetuate injustice,” Herring said at a news conference announcing the action.

As a practical matter, the old legal opinions had been rendered moot by civil rights laws and Supreme Court cases outlawing discrimination. But supporters of Herring’s action said it was important to formally renounce those opinions.

“Just like Virginia wiped racist, outdated laws off the books in recent years, so too should it wipe away racist, outdated legal opinions that supported and helped to implement those same laws,” said Sen. Mamie Locke, a senior member of the Virginia Legislative Black Caucus.

Herring said the review going back more than a century was a massive project “but as I saw that my time was coming to an end, I knew it was important for the commonwealth for us to get this across the finish line.”

Herring lost his reelection bid in November and will be succeeded on Saturday by Republican Jason Miyares.

The opinions that have been overturned were used to support the state’s Massive Resistance campaign, in which Virginia employed a wide variety of tactics to fight off federal desegregation efforts, including shutting down public schools rather than allowing integration.

In 1956, then-Attorney General J. Lindsay Almond, who later became governor, issued an opinion on proposed legislation and how it would aid the broader effort “to save, as far as possible, the public school system from that serious impairment or destruction which mixing of the races would surely bring.”

In 1908, then-Attorney General William A. Anderson weighs in on how children of the “Mongolian or Chinese race” should be classified in Virginia’s segregated school system. After explaining that the law itself provides no direct guidance, he ultimately advises that “it would be the duty of the local boards to prohibit the admission of Chinese children into any white school.”

“I suppose there can be no question but that people of the Chinese or Mongolian race are in fact colored people,” he wrote.

One opinion advised county clerks on the best ways to ensure upholding Virginia’s interracial ban, which the U.S. Supreme Court overturned in the 1967 Loving v. Virginia case. In the 1920s, multiple opinions were issued to support Democratic Party rules that allowed only whites to vote in party primaries.

“These opinions, unfortunately, shaped the laws, life, and culture of the Commonwealth for too long,“ said Virginia State Conference NAACP President Robert N. Barnette, Jr., who called Herring’s action “an important step towards true reconciliation.”