Mississippi's top court has ruled in favor of a man who spent most of his adolescence in prison for a murder he didn't commit, saying his false confession did not automatically make him undeserving of compensation.

But whether he'll get any money is still an open question: The court ordered a jury to decide.

Tyler Edmonds was just 13 when he confessed to helping his half-sister shoot her husband. But he later recanted, claiming she'd put him up to it.

Related: Wrongfully Convicted Child’s Murder Confession Tests Compensation Law

A jury convicted him anyway, and he spent four years behind bars before the case was overturned and a second jury acquitted him.

He applied for $158,333 in compensation, but a judge denied him, citing a state law's prohibition against payouts to those who "fabricate evidence to bring about their conviction."

Edmonds' saga, which explores the limits of justice for the wrongfully convicted, including laws restricting compensation to people who falsely confess, was chronicled by NBC News earlier this year.

On Thursday, the Mississippi Supreme Court released a 5-4 decision in favor of Edmonds, now 28, in which it reversed the judge's denial and sent the case back to a lower court for a jury trial.

The ruling turned in part on an interpretation of what lawmakers meant by the word "to" in the phrase "to bring about their conviction."

The court's majority said it agreed with Edmonds' lawyer, Jim Waide, who said the law only meant to bar applicants who gave untrue statements with the specific purpose of being sent to prison. At trial, Edmonds testified that he sought to protect his half-sister ─ who is serving a life sentenced for the killing ─ but, as a 13-year-old, did not intend to go to jail.

Tyler Edmonds, then 14, during a 2004 court appearance. Kelly Tippett / The Commercial Dispatch via AP

Government lawyers argued that Edmonds' intent didn't matter ─ all the state had to do was show that the false confession caused his conviction.

The Mississippi Attorney General's Office declined comment Thursday.

Edmonds has said that the money would help him repay his mother for getting him through his struggle, but he also wanted to stand up against the way he was treated.

"It's not over yet," he said Thursday. "For me, a lot of this is just showing you can't go screwing people over and not be held accountable."