A man who was sentenced to life in prison for kidnapping a baby who was cut from his neighbor's womb by his girlfriend and lying to police about it will receive a new hearing after the North Dakota Supreme Court ruled Thursday that the original sentence did not fit the elements of the crime.

William Hoehn, who pleaded guilty to conspiracy to commit kidnapping, received a life sentence because the judge in the case granted prosecutors' request to designate him a dangerous special offender, which carries a life sentence.

Savanna Greywind was eight months pregnant when she disappeared from her apartment in north Fargo in August 2017. Her body later turned in Red River. Her baby had been cut from her womb but survived the attack.

Savanna Greywind, 22, was eight months pregnant when she was murdered by her neighbor, and her baby cut from her womb in Aug. 2017. Her body was found in Red River lake.  (Facebook)

Rather than impose the maximum sentence of 21 years in prison on the kidnapping charge, Judge Tom Olson designated Hoehn a dangerous special offender, which carries the maximum sentence of life with the possibility of parole, for which he'd be eligible in 25 to 30 years.

The prosecutor's request was based on Hoehn's prior conviction of child abuse in 2012 when his son suffered multiple fractures to his skull after being in Hoehn's care.

Hoehn, 34, appealed his sentence arguing that the district court incorrectly labeled him a dangerous offender because the crimes to which he pleaded guilty did not seriously endanger the life of another and he didn't have any similar prior convictions. Hoehn also claimed that the district court didn’t adequately advise him of the possible sentencing ramifications of entering a guilty plea, KFYR reported citing court documents.

WOMAN WHO KILLED NEIGHBOR BY CUTTING BABY FROM WOMB SAYS SHE DIDN'T 'EXPLICITLY' ALERT HER EX

The state Supreme Court upheld the conviction but said a comparison of the elements of the kidnapping crime with the child abuse charge from 2012 did not support the finding that the two offenses were comparable, thus a dangerous special offender label was unsubstantiated.

Hoehn's defense attorney, Kiara Kraus-Parr, said it was a "pretty clear-cut case" and she had been "cautiously optimistic" her client would prevail.

"I think the state overreached in what they charged, as far the special dangerous offender," she told The Associated Press.

Hoehn's resentencing may occur as soon as in two weeks, notwithstanding the prosecution filing for a rehearing.

Hoehn's girlfriend, Brooke Crews, pleaded guilty to conspiracy to commit murder and kidnapping and was sentenced to life in prison without the possibility of parole.

Crews, 40, told the jury in Hoehn's trial that she feigned pregnancy because she was afraid of Hoehn ending their relationship, but once he discovered she was lying, he told her she needed "to produce a baby," which Crews interpreted as an "ultimatum."

Crews said she never explicitly told Hoehn what she planned to do, but when he arrived home, he saw Greywind bleeding and dying, along with her newborn baby, and he twisted a rope around Greywind's neck to make sure she was dead. A coroner was unable to determine whether the cause of death was strangulation or blood loss.

Hoehn denied knowing anything about Crews' plan to kill Greywind and take her baby, but he admitted he hid the newborn and gave false information to law enforcement to cover up the crime.

Greywind, 22, was a member of the Spirit Lake Sioux Tribe and her family had ties to the Turtle Mountain Band of Chippewa.

Her death sparked outrage from Native American activists who urged Congress to pass a bill, Savanna’s Act, spearheaded by then-Sen. Heidi Heitkamp, a Democrat. The bill, which remained under consideration, would improve tribal access to federal crime information databases and create standardized protocols for responding to cases of missing and murdered Native American women.

Greywind's now-2-year-old daughter, Haisley Jo, lives with her grandparents near Red River, not far from the same spot that Greywind's body was found.

CLICK HERE FOR THE FOX NEWS APP

Norberta Greywind, Haisley Jo's grandmother, begged the court to impose the maximum sentence on Hoehn and never let him walk free again.

"My life has been forever changed. As for Savanna's daughter, this man tried to take her and raise her as his own. He said the days he spent with my granddaughter were the happiest days of his life. How sick is that?" she said during sentencing.

The Associated Press contributed to this report.