Republican presidential candidate Mike Huckabee has no idea why the 14th Amendment happened.

Huckabee told radio host Michael Medved that the Supreme Court's 1857 Dred Scott v. Sandford decision, which denied citizenship to black Americans, is still the "law of the land" — in an attempt to show that it's okay for people to ignore Supreme Court rulings (particularly the June marriage equality decision) that they disagree with. "Michael, the Dred Scott decision of 1857 still remains to this day the law of the land, which says that black people aren't fully human," he said. "Does anybody still follow the Dred Scott Supreme Court decision?"

This is completely wrong. One of the main points of the 14th Amendment was to overturn the Dred Scott decision. Its birthright citizenship clause let black Americans become citizens, and its provisions for equal protection and due process under the law solidified all citizens' rights.

But this isn't the first time Huckabee has made a big mistake about the 14th Amendment. When he sat down with ABC News's George Stephanopoulos on Sunday for a tense exchange over Kentucky clerk Kim Davis, Huckabee appeared to repeat the same mistake about the Dred Scott decision. Then he made another, equally basic mistake about the Supreme Court's legal rationale for upholding same-sex marriage rights.

Huckabee asked, "When you say the federal government recognizes [same-sex marriage], what statute under which do they recognize it?"

There's a lot of philosophical debate about marriage equality and Davis's refusal to issue marriage licenses to same-sex couples. But at least to Huckabee's question, there's an easy answer: the 14th Amendment.

So Huckabee's ignorance about one of the most important constitutional amendments isn't just embarrassing for someone who's running for president. It also speaks to Huckabee's misunderstanding of why the Supreme Court legalized same-sex marriages and why and how Davis — whom Huckabee is now publicly defending and leading rallies for — was jailed after she refused to issue marriage licenses.

The 14th Amendment prohibits discrimination

The 14th Amendment established that no group should be denied equal rights or due process protections under the law. So when it comes to marriage, courts have found a fundamental right to marry, and same-sex couples can't be denied the same protections and rights guaranteed under federal and state marriage laws to other groups. This is the very foundation for the Supreme Court rulings that deemed federal and state bans on same-sex marriages to be unconstitutional. It is the statute that legalized same-sex marriages across the country.

Although the 147-year-old 14th Amendment was written at a time when the fight over same-sex marriage rights was far from the mainstream, legal scholars agree that it was purposely written in a broad manner to ensure that all groups — even those that the authors of the 14th Amendment couldn't envision — would be shielded from discrimination or denial of fundamental rights. So it's actually no accident that it's the basis today to protect same-sex couples.

"The authors of the 14th Amendment rejected drafts and proposals that would have limited the 14th Amendment just to racial discrimination," Judith Schaeffer, vice president of the Constitutional Accountability Center, said in June. "Instead, they put in language that protects any person — not just on the basis of race, but any person."

The 14th Amendment has been used in marriage cases before: In Loving v. Virginia in 1967, the Supreme Court concluded that states' bans on interracial marriages discriminated against interracial couples, and denied them the fundamental right to marry, and were therefore unconstitutional. Although Huckabee told Stephanopoulos that Loving v. Virginia was totally different, the legal rationale for it was the same as the decisions in the same-sex marriage cases: Just as interracial marriage bans violated interracial couples' equal protection and due process rights under the 14th Amendment, so too did same-sex marriage bans violate same-sex couples' rights under the 14th Amendment.

The 14th Amendment is key in Kim Davis's case

The answer to Huckabee's question is important not for clearing up the presidential candidate's ignorance but to the case of Davis in Kentucky as well.

When Davis decided earlier this year that she would stop her entire office (not just herself) from issuing marriage licenses to same-sex couples, she did it in a way that actually acknowledged the 14th Amendment's importance to marriage equality: She prevented her office from issuing marriage licenses to anyone — both opposite-sex and same-sex couples. That way, she reasoned, she couldn't be accused of trying to discriminate — she wasn't just denying same-sex couples a right, but other couples, too.

But this placed Davis in conflict with Kentucky law, which requires that clerks issue marriage licenses, and the Due Process Clause of the 14th Amendment, which courts say upholds the fundamental right to marry. So when Davis forbade her office from issuing marriage licenses, ignored federal court orders that she issue marriage licenses, and said she would stop her deputy clerks from issuing marriage licenses if she was released from jail, she effectively forced US District Judge David Bunning to put her in jail so the Rowan County clerk's office could conduct its legal duties without Davis's interference. That cascade of effects, originating from her attempts to bypass the 14th Amendment, is why she landed in jail.