LOGAN, Utah -- A teenager accused of encouraging a plot to kill a 14-year-old girl who was left in a ditch with a gunshot to her head pleaded guilty on Tuesday.

Jayzon Decker, 17, faces up to life in prison after entering the pleas to attempted aggravated murder and felony obstruction of justice in an agreement with prosecutors.

Prosecutors said he and friend Colter Peterson concocted the plot targeting victim Deserae Turner in February while playing video games. After his arrest, Peterson told police he had become annoyed with Turner for texting him and messaging him over Snapchat, according to preliminary hearing testimony cited by the Salt Lake Tribune.

Get Breaking News Delivered to Your Inbox

Decker told Peterson it would be "pretty easy to get rid of her," a Cache County sheriff's deputy testified at the hearing, the paper reports.

Deserae Turner, a Utah teenage girl who survived being shot in the head by two boys and left for dead in a ditch, is wheeled from a news conference Thursday, April 20, 2017, after speaking with reporters, at Primary Children's Hospital, in Salt Lake City. Rick Bowmer/AP

The boys, then both 16, lured Turner to a dry canal in the small northern Utah town of Smithfield, about 90 miles north of Salt Lake City, by promising to sell her a knife, authorities said.

They'd originally planned to cut the girl's throat, according to charging documents obtained by the paper, but Peterson shot her instead and then left her for dead in a ditch, prosecutors said. Decker was accused of keeping the shell casing as a memento.

She was found alive after an overnight search and hospitalized for two months. Her injuries still leave her struggling to eat and walk, her family has said.

In an interview with detectives, one of the suspects told investigators the motive for the attack was "greed," according to the documents. They took $55 from Turner's purse, tossed her backpack in a trash bin and destroyed her cellphone and iPod, prosecutors wrote.

Deserae Turner, 14, was found in a ditch after being shot in the back of the head by a teenage boy in Utah. AP

Turner attended the hearing and cried quietly as Cache County Attorney James Swink described her partial paralysis and daily headaches from the bullet still lodged in her skull, The Deseret News reported.

The Associated Press does not typically name juvenile defendants, but the teens were ordered to face charges as adults.

Prosecutors dropped attempted robbery and additional obstruction of justice counts in exchange for the pleas.

Defense attorney Shannon Demler said that while Decker didn't shoot the girl, he decided to take responsibility for his role.

"He has had a lot of time to think about it. He obviously wishes he could take what happened back, but he knows that he can't and he needs to move on," he said, according to the Deseret News.

Decker said little as he entered his pleas in a quiet voice. He is set to be sentenced Feb. 7.

Peterson pleaded guilty to attempted aggravated murder and robbery in October. In a statement released to CBS affiliate KUTV that month after Peterson's plea, the girl's family called it "a step towards justice for Deserae."

"Our lives have been forever changed by this tragedy, but the caring of so many have helped us as Deserae and our family continue to heal," the statement said.

After leaving the hospital in April, the girl spoke to the media during a press conference with her family, wearing a shirt that read, "Happy."

"I am so thankful to be here today, to be alive," Turner said. "I have been working really hard and still have a lot of work to do. I told my dad I am tougher than a bullet."