The man accused of murdering 17-year-old Michelle Bright in 1999 allegedly confessed to the crime while speaking with undercover operatives, telling them he put a hand over her mouth until she stopped breathing.
Aboriginal and Torres Strait Islander readers are advised that this article contains the name and image of a person who has died.
The murder trial of Craig Henry Rumsby, 56, began in a Supreme Court sitting in Dubbo on Wednesday.
Mr Rumsby pleaded not guilty to the alleged murder of Ms Bright and to an alleged attempt to choke and strangle an 18-year-old girl with intent to sexually assault in 1998.
Ms Bright vanished after attending a birthday party in Gulgong near Mudgee on February 26, 1999.
Her partially naked body was found dumped next to train tracks less than a kilometre from her Gulgong home on March 2 in the same year.
The court heard an autopsy found grazes on her abdomen, thighs and knuckles, but could not confirm the cause of death, with a doctor saying Ms Bright was killed by "homicidal violence of an undetermined aetiology".
In his opening statement, Crown Prosecutor Lee Carr told the jury the alleged attempted sexual assault occurred in Gulgong just 13 months before Ms Bright's death.
Undercover police used during investigation
The jury heard that during the investigation while speaking with undercover police, Mr Rumsby allegedly confessed to murdering Ms Bright and attempting to sexually assault an 18-year-old woman on New Years Eve 1997.
The jury heard Mr Rumsby told undercover police he wanted to "have a crack" at the 18-year-old after she came out of her home alone.
"He stated he wanted to try and f--k her, he said she was 18 and had a good body," Mr Carr told the court.
In relation to Ms Bright's death, Mr Rumsby allegedly told undercover police he hit her after hearing her footsteps behind him while walking down Barney's Reef Road.
He allegedly said he didn't think he raped the teenager, but he covered her mouth for 10 minutes until she stopped breathing.
Mr Rumsby allegedly told his associates he recalled undoing Ms Bright's shirt, pulling up her bra and touching her breasts after he killed her.
The prosecution put it to the jury that Mr Rumsby also sexually assaulted Ms Bright before he killed her.
"He decided to take her life because he didn't want to get pinned for it," Mr Carr said.
Mr Carr said there were "significant similarities" between the two attacks on the young women, who were allegedly grabbed by the throat while they were alone in the dark.
The prosecution also told the court Mr Rumsby had a "sexual interest in females of late teens" and a "tendency to act on that" by committing sexually motivated violence.
Mr Carr said many people — including Mr Rumsby — were asked to provide DNA, but there was no scientific match linking anyone to Ms Bright's death.
Mr Rumsby's defence team will give their opening address on Thursday.