A man accused of killing two people during a string of crimes committed in Utah and Nevada with his girlfriend pleaded guilty Wednesday in a deal that lets him avoid the death penalty.

Logan Welles McFarland, 29, was sentenced in Utah to serve two life prison terms, one on each count of aggravated murder. McFarland, who had been in prison in Nevada, was extradited to Utah in 2015.

He was charged with killing a retired couple, Leroy and Dorothy Fullwood, during a 2011 home robbery in the central Utah town of Mount Pleasant.

Four other felony charges were dropped in exchange for his pleas. His Utah lawyer didn't immediately return a call seeking comment. His Nevada attorney has said McFarland's methamphetamine use clouded his judgment.

Prosecutor Brody Keisel said the pleas marked a great day for the victims' family and Utah. "Justice was served," he said in a statement.

After the couples' deaths, McFarland and his girlfriend traveled to Nevada. They shot a woman in the head in a botched carjacking attempt outside a West Wendover casino, more than 200 miles away from the Fullwood home, prosecutors said.

The carjacking victim survived, and McFarland and girlfriend Angela Hill were arrested in the Nevada desert.

Police connected both crimes with a receipt for fast food found in a stolen car. The food was paid for with Leroy Fullwood's credit card, according to charging documents.

Investigators found other items stolen from the Fullwood home, including a turquoise necklace Leroy Fullwood made for his wife, left by McFarland and Hill in the trunk of a friend's car, court documents state.

McFarland was serving up to 56 years in a Nevada prison on kidnapping and car theft charges before his extradition to Utah.

McFarland's now ex-girlfriend testified against him in Nevada, where she was sentenced to 30 years in prison. She has pleaded not guilty to burglary charges in Utah. Her lawyer didn't immediately return a call seeking comment on her case.