In 2015, Kansas passed SB95, a stringent law banning the method of abortion most commonly used after the first trimester. Following an inevitable lawsuit, the Kansas Court of Appeals concluded that the Kansas Constitution protects a woman’s right to terminate her pregnancy and invalidated the law. Now the state is appealing that decision to the Kansas Supreme Court—and its solicitor general is defending the law by approvingly citing Dred Scott v. Sandford.

A little background: Section 1 of the Kansas Constitution guarantees that “all men are possessed of equal and inalienable natural rights, among which are life, liberty, and the pursuit of happiness.” This language is drawn directly from the Declaration of Independence—much like Section 1 of the 14th Amendment to the United States Constitution, which protects the right to an abortion. An amicus brief by the American Civil Liberties Union of Kansas and the Constitutional Accountability Center argues that because the 14th Amendment guarantees abortion rights, the Kansas Constitution must, as well. As the brief explains:

Section 1 of the Fourteenth Amendment was designed to incorporate the promises contained in the Declaration of Independence and guarantee the full scope of substantive fundamental rights and equality in line with the Declaration’s promise. Section 1 of the Kansas Constitution, which was also adopted to guarantee the Declaration’s promises to the people of Kansas and even used the same language contained in the Declaration, should be interpreted to provide protection for substantive fundamental rights that is at least as strong as that provided by the Fourteenth Amendment.

And those rights include protection against a law that “substantially burdens a woman’s right to enjoy personal autonomy and bodily integrity.” In other words, a law like SB95.

But Kansas disagrees. In his brief, Solicitor General Stephen R. McAllister insists that this argument is flawed because “[c]ourts across the country have recognized that ‘[t]he Declaration of Independence is a statement of ideals, not law.’ ” Thus, the Kansas Constitution’s adoption of the declaration’s language provides no fundamental rights to Kansas residents—certainly not the right to an abortion. To support this proposition, McAllister cites, among other cases, Dred Scott, explaining that the decision described “the Declaration’s description of unalienable rights as merely ‘general words used in that memorable instrument’ and [held] that the Declaration did not have a legally binding effect.”

That is a curious choice, because Dred Scott is widely acknowledged as the worst Supreme Court decision of all time. Handed down in 1857, Dred Scott held that people “of African descent” are not and cannot become citizens under the United States Constitution. In his majority opinion, Chief Justice Roger B. Taney explained that blacks have long been “regarded as beings of an inferior order, and altogether unfit to associate with the white race, either in social or political relations; and so far inferior, that they had no rights which the white man was bound to respect; and … might justly and lawfully be reduced to slavery for his benefit.”

It was in this context that the Dred Scott court declared that the Declaration of Independence had no binding legal effect. The “language used in the Declaration of Independence,” Taney wrote, shows “that neither the class of persons who had been imported as slaves, nor their descendants, whether they had become free or not, were then acknowledged as a part of the people, nor intended to be included in the general words used in that memorable instrument.” This passage is exactly what Kansas cites to prove that the declaration is merely a “memorable instrument” with no legal effect—a passage concluding that black people, “that unfortunate race,” could never become part of “the people” who receive full rights under the law.

Although Kansas doesn’t mention it, Dred Scott was overturned by the 14th Amendment, which guarantees “liberty” and “equal protection” to all people—including blacks and women. And that brings us to the final irony here. Kansas cites Dred Scott to bolster its position that the language of the Declaration of Independence could not possibly protect abortion rights. Yet Dred Scott was overturned by the 14th Amendment, whose language, drawn from the Declaration of Independence, protects abortion rights. The Kansas Constitution borrows that same language. It would seem, then, that by citing Dred Scott, McAllister accidentally proved himself wrong—and neatly demonstrated why the Kansas Constitution does, indeed, render SB95 invalid.

Update, October 19, 2016: The Solicitor General filed a motion to withdraw the brief in question on Wednesday afternoon. “Yesterday’s reference to Dred Scott in a State’s response brief does not accurately reflect the State’s position, is not necessary for the State’s legal argument, and should not have been made,” Kansas Attorney General Derek Schmidt said in a statement. “Neither the State nor its attorneys believe or were arguing that Dred Scott was correctly decided. 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. The unfortunate use of this citation should not distract from the important question the Kansas Supreme Court faces in this case: Whether the Kansas Constitution establishes a state-level right to abortion. The State will continue to argue vigorously that it does not.”