A woman who was with her boyfriend when he allegedly beheaded an Iron Range man along a northern Minnesota road pleaded guilty to second-degree murder Friday.

Kayleene D. Greniger, 23, of Grand Rapids, Minn., entered her plea in Itasca County District Court. As part of the plea agreement, prosecutors said, Greniger will be required to testify against her then-boyfriend Joseph C. Thoresen, 36, of Deer River, Minn.

Thoresen is charged with carrying out the June decapitation of 20-year-old David A. Haiman of Hibbing. Thoresen remains jailed on charges of first-degree murder and other counts.

The prosecution said it anticipates that Greniger will be sentenced to a term ranging from 28 to 30 years.

“The sentencing agreement is consistent with the Minnesota sentencing guidelines and is subject to the approval of the court,” the county attorney’s office said in a statement announcing the deal. Greniger remains in custody until sentencing in December.

Messages were left Thursday with attorneys for both defendants seeking their reaction to the plea agreement.

Haiman was killed in an ambush along a northern Minnesota road, his body left in one spot in the woods, his head dumped elsewhere, according to charges against both defendants.

Greniger told authorities that Thoresen was upset when she revealed to him that Haiman had raped her in the couple’s apartment, according to prosecutors.

Thoresen allegedly hit Haiman with a baseball bat, stabbed him in the torso and beheaded him with a machete.

Greniger was in the car at the time of the killing and also hid the machete in the couple’s apartment, the charges say.

She later led authorities to Haiman’s torso and head, according to the charges.