WASHINGTON — Edward G. McDonough, the embattled longtime Democratic elections commissioner in Rensselaer County, prevailed in his efforts to get the U.S. Supreme Court to affirm that his lawsuit against a county special prosecutor should be reinstated after lower courts determined he was too late in filing it.

In a decision released Thursday morning, the nation's highest court said the clock determining the deadline for the filing of McDonough's claim against prosecutor Youel "Trey" Smith should have begun ticking when he was acquitted in December 2012, and not earlier when the allegedly fabricated evidence was first brought against him.

The majority opinion and minority dissent involved an unusual realignment of conservative and liberal justices on the nation’s highest court.

Justice Sonia Sotomayor, a Bronx, liberal appointed by President Barack Obama, wrote the court’s decision, joined by fellow liberals Stephen Breyer and Ruth Bader Ginsburg, as well as conservatives Samuel Alito, Brett Kavanaugh, and Chief Justice John Roberts.

“‘McDonough … had a complete and present cause of action for the loss of his liberty only once the criminal proceedings against him terminated in his favor,” Sotomayor wrote.

The Supreme Court, she added, “has never suggested that the date on which a constitutional injury first occurs is the only date from which a limitations period may run.

In a dissent, Justice Clarence Thomas was joined by fellow conservative Neil Gorsuch, and liberal Elena Kagan. Thomas wrote that the Supreme Court should never have heard the case absent first determining whether McDonough's claims have merit.

“McDonough’s failure to specify which constitutional right (Smith) allegedly violated profoundly complicates our inquiry,” Thomas wrote. “Because the constitutional basis for McDonough’s claim is unclear, we are unable to confirm that he has a constitutional claim at all.’’

The back-and-forth between the justices hinged on seemingly arcane interpretations of various Supreme Court precedents and how they applied to McDonough’s prosecution and ultimate acquittal. But the implications for a closely watched case in the Capital Region were profound: McDonough is virtually certain of getting his day in federal court in Albany to pursue his claims against Smith.

“The Court has stated this claim must be litigated, so that's what we'll do,” said Smith’s lawyer, Thomas O’Connor.

“It felt good” when news of the Supreme Court’s decision broke on Thursday, said McDonough’s original trial and appellate lawyer, Brian Premo. “I always felt confident we had facts and the law on our side. But certainly, you never know how any case in front of any court will go.”

The case stems from a 2009 investigation of forged absentee ballots submitted in a primary election of the Working Families Party in Troy.

McDonough processed the ballots as commissioner of the county board of elections, but insisted he knew nothing of any forgeries. Smith was specially appointed to prosecute McDonough.

McDonough alleged that Smith harbored a grudge against him and his family and tried to scapegoat McDonough.

When McDonough refused to confess, Smith allegedly fabricated evidence against him. According to McDonough, the fabrications included falsified affidavits, witnesses coached to lie, and a suspect DNA analysis to link McDonough to ballot envelopes.

Smith brought McDonough to trial in January 2012. The result was a mistrial. Smith tried again but a jury acquitted McDonough of all charges on December 21, 2012.

McDonough filed his suit against Smith on Dec. 18, 2015. If the legal clock were ruled to start ticking after his acquittal, McDonough would have been right on time. But a trial judge and the U.S. Court of Appeals for the 2nd Circuit in New York City ruled the ticking started months earlier when McDonough became aware of the fabrication. Therefore, they ruled, McDonough was too late.

The Supreme Court on Thursday reversed the Second Circuit.

The majority cited practical problems that would ensue if they were to rule the statute of limitations must start ticking when a defendant becomes aware of falsified evidence.

Criminal defendants would have to choose between letting their claims against prosecutors expire, or filing a lawsuit against the prosecutor in the midst of prosecution’s case against the defendant.

“The first option is obviously undesirable, but from a criminal defendant’s perspective the latter course, too, is fraught with peril,” Sotomayor wrote. The defendant “risks tipping his hand as to his defense strategy, undermining his privilege against self-incrimination.”