Raymond Clark, 26, made a plea agreement that calls for a 44-year-long sentence.
Clark is accused of strangling 24-year-old Annie Le of Placerville in 2009, mere days before her wedding.
Her body was found stuffed upside down behind a research lab wall on Sept. 13, 2009, five days after she was last seen inside the Yale medical building.
DNA evidence led investigators to Clark. The sex charge and related evidence offered the first official revelation of a potential motive in the case.
"We believed all along that was the motivation," said Joe Tacopina, attorney for the victim's parents.
Prosecutor David Strollo said there was evidence that Clark tried after the killing to generate an alibi, scrub the crime scene and even fish evidence out from behind the wall.
Strollo said Thursday that Le had suffered a broken collar bone and jaw while she was alive, and that her underwear had been disarranged. Strollo also noted that Le was 4 feet 9 inches tall and weighed 89 pounds, while Clark was 5 foot 9 inches tall and weighed 190 pounds.
He also cited DNA evidence including Clark's semen and a green-ink pen under Le's body that had her blood and Clark's DNA. Police have said Clark signed into the secure building with a green pen the day Le disappeared. DNA from Le and Clark also was on a bloody sock found hidden in a ceiling.
Le was a doctoral pharmacology student who worked on a team that experimented on mice as part of research into enzymes that could have implications for treatment of cancer, diabetes and muscular dystrophy.
At her memorial service, family and friends remembered for her academic success, sense of humor, ambition, love for shoe-shopping and love for her fiance, Jonathan Widawsky.
Clark was scheduled to be sentenced May 20.
The Associated Press contributed to this report.