CHICAGO — The confession of a Wisconsin inmate featured in the Netflix series "Making a Murderer" was improperly obtained and he should be released from prison, a three-judge federal appeals panel ruled Thursday.

Brendan Dassey is escorted into court for sentencing in Manitowoc, Wisconsin, in August 2007. AP

Brendan Dassey, 27, was sentenced to life in prison in 2007 in the death of photographer Teresa Halbach on Halloween two years earlier. Dassey told detectives that he helped his uncle, Steven Avery, rape and kill Halbach in the Avery family's Manitowoc County salvage yard. Avery was sentenced to life in a separate trial.

A federal magistrate judge ruled last August that investigators coerced Dassey, who was 16 years old at the time and suffered from cognitive problems, into confessing and overturned his conviction. The state Justice Department appealed the ruling to the 7th U.S. Circuit Court of Appeals, a move that kept Dassey behind bars pending the outcome.

A three-judge panel from the 7th Circuit upheld the magistrate's decision to overturn Dassey's conviction. State attorneys' only recourse now is the U.S. Supreme Court. They also could elect to re-try Dassey.

Avery and Dassey contend that they were framed by police angry with Avery for suing Manitowoc County over his wrongful conviction for sexual assault. Avery spent 18 years in prison in that case before DNA tests showed that he didn't commit the crime. He's pursuing his own appeal in state court.

Their cases gained national attention in 2015 when Netflix streamed "Making a Murderer," a multi-part documentary looking at Halbach's death, the ensuing investigation and the trials. The series sparked widespread conjecture about the pair's innocence and has garnered them a massive following on social media pushing for their release.

Authorities who worked on the cases insisted that the documentary was biased.

Ken Kratz, the district attorney in neighboring Calumet County, who was brought in as a special prosecutor, wrote in his book "Avery" that Dassey was "a shuffling, mumbling young man with bad skin and broken-bowl haircut" who could have saved Halbach's life.

Instead, Kratz wrote, Dassey involved himself in her rape and murder, and Avery is "by any measure of the evidence, stone guilty."