A Montana woman pleaded guilty Thursday to pushing her newlywed husband off a cliff, changing her plea just before lawyers in the case were set to deliver closing arguments.

Jordan Graham, 22, pleaded guilty to second-degree murder in order to avoid charges of first-degree murder and lying to investigators, the Great Falls Tribune reports. She had been married to Cody Johnson for just eight days when she pushed him off the cliff in Montana’s Glacier National Park in July, prosecutors say.

Prosecutors had presented evidence that Johnson cancelled plans on the day of his death because his wife said she had a “surprise” for him, and that a piece of cloth resembling a blindfold had been found near his body, NBC reports. They also said that Graham had sent friends text messages about being unhappy with their marriage. Graham had previously said that the fall happened during the argument, but that she pushed him in self-defense.

Under the plea agreement, Graham would face a maximum sentence of life in prison.