This week, in a widely noted move, the Arkansas Supreme Court unanimously invalidated a state voter ID law on the grounds that it added a qualification to those already laid out in the Arkansas constitution. The state Supreme Court decision came just days before early voting was set to begin. The court’s opinion in Martin v. Kohls is straightforward, but embedded in the court’s reasoning lies a wonderful, as yet unreported, irony.

Professor John Pagan of the University of Richmond Law School pointed out to me Thursday that in reaching its decision in Martin, the Arkansas Supreme Court of 2014 relied on an 1865 case called Rison v. Farr, also decided by the state Supreme Court. Rison was decided when the pro-Union legislature of Arkansas tried to disenfranchise former Confederate soldiers who, after the war, refused to swear an oath declaring that they had stopped fighting for the Confederacy on April 18, 1864—a year before the Civil War ended. What happened on April 18, 1864? The Battle of Poison Spring, which ended in a massacre of wounded and captured ex-slaves serving on the Union side in the First Kansas Colored Infantry. They were slaughtered after surrendering to the Confederate troops.

The Rison court found that the plaintiff, Zachariah P.H. Farr, who had shown up to vote in 1865, was denied that right when he refused to take an oath swearing that “he has not voluntarily borne arms against the United States or this state, nor aided, directly or indirectly, the so-called confederate authorities since the 18th day of April, 1864.” The court found that the state constitution provided explicitly that “every free white male citizen of the United States who shall have attained the age of twenty-one years, and who shall have been a citizen of the state six months next preceding the election, shall be deemed a qualified elector, and be entitled to vote in the county or district where he actually resides.” Modified versions of four of these qualifications (being a U.S. citizen, a resident of Arkansas, at least 18 years old, and lawfully registered to vote) are still the law in Arkansas.

In the Rison decision in 1865, the Arkansas Supreme Court found that because Farr met those four qualifications, the demand that he “purge himself of treason against the United States or this state” would have the effect of taking away from him the franchise guaranteed by the state constitution. And this week, the Arkansas Supreme Court relied on Rison to establish that “the legislature cannot, under color of regulating the manner of holding elections, which to some extent that body has a right to do, impose such restrictions as will have the effect to take away the right to vote as secured by the constitution.”

Just to be perfectly clear as to what just happened here, the Arkansas Supreme Court relied on a post–Civil War case restoring the franchise to former Confederate soldiers, including some who had slaughtered former slaves, to strike down a new voter ID law that would have suppressed the vote of minorities. Or as Pagan put it in an email:

My great-great grandfather, who served in an Arkansas regiment of the Confederate Army from 1861-65, was disenfranchised under the 1864 statute held unconstitutional in Rison. That the restoration of his voting rights by judicial decision in 1865 should provide the constitutional basis for preventing the disenfranchisement of enslaved people’s descendants in 2014 has to be one of the most remarkable turnabouts in the legal history of the South.