A federal appeals court on Thursday said inmates had a right to sue a Tennessee judge who shortened people's jail sentences if they agreed to get vasectomies or other forms of birth control.

The lawsuit, filed in 2017, said White County Sheriff Oddie Shoupe and Judge Sam Benningfield violated the constitution by allowing inmates to get 30 days off a jail term if they agreed to a birth control implant or vasectomy.

Benningfield was publicly reprimanded for the practice.

A federal district court judge said the lawsuit was rendered moot in 2018, after Tennessee passed a new law banning such deals. But the 6th U.S. Circuit Court of Appeals disagreed, and sent the case back to the Nashville-based district court for review.

The case was not moot, the appeals court said, because the inmates who sued still stood to benefit from the 30-day credit they were denied because they refused to participate in the deal.

The appeals court also said the inmates had standing to argue the deal violated the U.S. Constitution, and suggested the White County practice violated the Equal Protection Clause of the 14th Amendment.

"Requiring inmates to waive a fundamental right (to procreate) to obtain a government benefit impermissibly burdens that right," the court wrote in its Thursday opinion.

Nashville lawyer Daniel Horwitz, who represented the inmates, praised the appeals court's decision.

“This decision sends a clear, important message that should never have been necessary in the first place: Inmate sterilization is illegal and unconstitutional,” Horwitz said in a statement.

► Get your news on the go: Download The Tennessean app

Reach Adam Tamburin at 615-726-5986 and atamburin@tennessean.com. Follow him on Twitter @tamburintweets.