A Montana newlywed accused of killing her husband in Glacier National Park pleaded guilty Thursday to second-degree murder after four days of trial — half the time her marriage lasted.

Jordan Linn Graham, 22, accepted a plea bargain in the July death of her husband, Cody L. Johnson, 25. The plea was announced in federal court in Missoula, Mont., before the case could go to the jury, a spokeswoman for the U.S. Attorney’s Office said.

Prosecutors agreed to drop a first-degree murder charge and a count of making a false statement to authorities.

Graham, of Kalispell, now faces a maximum of life in prison when she is sentenced March 27, the spokeswoman said, adding that Graham was taken into custody.

Unlimited Digital Access. $1 for 4 weeks.

Graham reported her husband missing July 8, saying he’d left the night before after getting a cellphone call that upset him. But since their June 29 wedding, she had been confiding in a friend about how unhappy she was, and said she planned to talk to her husband about it.

On July 7, when they went for a hike on a remote trail, Johnson plunged to his death, and she came home alone without calling authorities.

The day after reporting him missing, she led authorities to his body.

In accepting her guilty plea, U.S. District Judge Donald Molloy told Graham to recount what had happened when Johnson died.

She said she’d told her husband she was not happy and not feeling the way she thought she should after they got married. She said they argued on a ledge, Johnson grabbed her arm, she brushed his arm away and pushed him.

“I wasn’t thinking about where we were. … I just pushed,” she told the judge, according to media reports from the courtroom.