Louis Schultze via Getty Images Dred Scott, a former slave, lost a Supreme Court case that took the Civil War to overrule.

In life and the law, there are a few things no good lawyer should ever do ― like citing an overruled Supreme Court precedent that is widely reviled as the very worst in American history

But someone in the Kansas attorney general’s office apparently thought it was a good idea to cite to Dred Scott v. Sanford, the 1857 pro-slavery ruling, in a pending case where the state is defending an anti-abortion bill that was earlier ruled unconstitutional.

Elizabeth Wydra, president of the legal think tank Constitutional Accountability Center in Washington, noted the citation on Tuesday, which led to outrage on social media and a barrage of breathless coverage in multiple outlets.

And with good reason: Lawyers, let alone state attorneys general or their underlings, should know better than to make legal arguments by giving a thumbs-up to a ruling that declared that African-Americans are not citizens deserving of constitutional protection. It took a Civil War to overrule Dred Scott.

In response to the backlash, Kansas withdrew the offending legal brief on Wednesday:

Kansas has moved to withdraw Dred Scott-citing brief defending the state's abortion restriction @MyConstitution pic.twitter.com/BiYljtXEI2 — Elizabeth Wydra (@ElizabethWydra) October 19, 2016

In an accompanying media statement, Kansas Attorney General Derek Schmidt acknowledged the citation to Dred Scott “should not have been made.”

“Neither the State nor its attorneys believe or were arguing that Dred Scott was correctly decided,” Schmidt said. “Nonetheless, the reference to that case was obviously inappropriate, and as soon as I became aware of it today, I ordered the State’s brief withdrawn.”

Schmidt still thinks Kansas should win the abortion case, in which his office is arguing that the state constitution doesn’t protect “a state-level right to abortion.”

Be that as it may — the Kansas Supreme Court will have the final word in the dispute ― a ruling that deserves to be in the dustbin of constitutional history should never have been a part of it.