A federal judge in Wisconsin on Monday ordered the release of Brendan Dassey, who was imprisoned for life for helping his uncle kill a freelance photographer in 2005 in a case spotlighted in the Netflix documentary "Making a Murderer."

Based on Magistrate Judge William Duffin's order, Dassey, who has been incarcerated more than a decade, could be released within 90 days unless prosecutors attempt to retry him.

Dassey, now 27, and his uncle, Steven Avery, were convicted in separate trials of killing photographer Teresa Halbach at Avery's home in Manitowoc County, Wisconsin. Halbach's charred remains were found in an incineration barrel and a burn pit on Avery's property, about 80 miles north of Milwaukee.

Dassey was convicted of first-degree intentional homicide, second-degree sexual assault and mutilation of a corpse. Avery was found guilty of first-degree intentional homicide and being a felon in possession of a gun. Dassey was sentenced by the court to life without parole.

In August, Duffin ruled the guilty verdict returned by a trial jury in 2007 against Dassey was based on a coerced confession he gave as a 16-year-old youth with a learning disability.

Duffin said the confession obtained by investigators violated Dassey's constitutional rights.

Wisconsin Attorney General Brad Schimel on Monday said that he intends to file an emergency motion in the Seventh Circuit seeking a stay of the release order.

The case was the subject of the 10-part Netflix-released documentary "Making a Murderer," which questioned the handling of the investigation and the motivation of Manitowoc County law enforcement officials, who sent Avery to prison in 1985 for a rape he did not commit.