A man pleaded guilty Tuesday to the 1974 slaying of a teenage girl at a rural Iowa farmhouse, ending a 40-year effort to hold her killer responsible.

Robert "Gene" Pilcher, who was long a suspect in the slaying of 17-year-old Mary Jayne Jones but had maintained his innocence, pleaded guilty to second-degree murder during his second trial in the case in Ottumwa.

Under a plea deal, prosecutors dropped a first-degree murder charge, which carries a sentence of life in prison. Both sides recommended a 10-year sentence, which Judge Richard Meadows imposed on the 68-year-old Pilcher.

Pilcher's first trial in January ended in a mistrial when jurors could not reach a unanimous agreement.

Jones was last seen at an Ottumwa bank on April 9, 1974. Hours later, her naked, bruised and bloody body was discovered on a bed in a farmhouse 7 miles away. Investigators said she was beaten with a shotgun, possibly sexually assaulted and shot twice at close range with a rifle.

The guilty plea stunned Judith Cabanillas, who was 13 when her older sister was killed.

"I'm glad that it's on record, finally, that he did what we always knew he did," Cabanillas said. But she also wanted Pilcher to receive a stiffer sentence.

He'll get credit for two years he's served since his 2012 arrest, and will qualify for reductions for good behavior.

Wapello County Attorney Gary Oldenburger said Pilcher may serve five or six more years, with the release date ultimately decided by the parole board.

"For a case this old, it's difficult to have enough evidence to prove the case to a jury. This family has been waiting for 40 years for a resolution. I think it's a good outcome overall," he said.

Pilcher, then 27, was a suspect immediately in Jones' death.

The farmhouse was owned by Pilcher's cousin, who was out of town. Four days earlier, Pilcher had lured another woman to the home, where she said he handcuffed and sexually assaulted her. Pilcher was charged with sodomy and perjury in that case, but investigators could not find evidence linking him to Jones' death.

The Iowa Division of Criminal Investigation re-examined evidence in 2010. Testing linked Pilcher's DNA — by then in a database of known felons — to three semen stains left on the blanket where Jones' body was found.

Prosecutors suggested the crime was sexually motivated, saying Pilcher was attracted to Jones and had asked her out when he was a customer at a drive-in restaurant where she worked.

Pilcher's lawyers argued the DNA evidence didn't prove he killed Jones, noting it could have been left there previously. They also said Pilcher had an alibi, with witnesses seeing him around Ottumwa that day.

Cabanillas said she hopes Jones, who grew up in North Carolina and had moved to Ottumwa to live with a sister, "finally has some peace."

"Jayne was special and she would have done beautiful things with her life," she said. "I'm glad he finally admitted it, but still, we miss her. Always will."