Joanna Yeates's killer confessed to a chaplain after refusing to answer any police questions during a three-day grilling, a court heard today.
Vincent Tabak was on suicide watch in prison when he is said to have told the Salvation Army's Peter Brotherton: "I have got something to tell you that is going to shock you."
Tabak then reacted angrily as Mr Brotherton told him he would not be able to keep the admission secret, the chaplain said.
Jurors at Bristol Crown Court were told Tabak confided in Mr Brotherton after refusing to tell police whether he had made any sexual advances towards Miss Yeates.
Detectives questioned the 33-year-old Dutch engineer for three consecutive days after arresting him on January 20.
He was said to have constantly replied "no comment" before he was charged with murdering Miss Yeates, 25.
But Tabak, who had been under 24-hour supervision at HMP Long Lartin, was said to have told Mr Brotherton of his plan to "plead guilty" on February 8.
The chaplain had shaken hands with Tabak before he made the confession.
Appearing in the witness box, Mr Brotherton said he decided he could not keep the information secret because Tabak was not religious.
Mr Brotherton, who has been visiting prisoners since 1975, said "there was a little bit of anger" in Tabak's voice after the chaplain said he would have to pass on the information.
"I'm not going to tell you anything else," Tabak was said to have told Mr Brotherton.
Tabak was being held in a cell with a clear glass door in the health unit at HMP Long Lartin when he made the appointment with Mr Brotherton.
Tabak, who admits manslaughter but denies murder, was said to have made the confession on their third encounter.
"He went to his cell to get his mug so he could have his water," Mr Brotherton said.
"I shook hands with him and said 'How are you?'. He said 'So, so'."
When Tabak told him he had something to tell him that was going to "shock you", Mr Brotherton was said to have replied: "You tell me and we will see."
After Tabak said "I am going to change my plea", Mr Brotherton asked him: "Are you sorry (for) what you have done?"
Tabak was said to have replied: "Yes."
During cross-examination, Tabak's QC William Clegg claimed Mr Brotherton's comments differed from a statement he gave on February 16.
Mr Clegg said: "Let me suggest to you there was no suggestion of 'changing my plea'. 'I am going to plead guilty' - that's what he said."
Miss Yeates's mother Teresa wept earlier as a picture of her daughter's body was shown to the jury.
She looked away and was comforted by her husband David as the harrowing photograph was shown.
The mortuary image showed the landscape architect lying fully clothed in the foetal position with her pink top pushed up, exposing her bra.
As Mr Yeates supported his wife, he looked over his shoulder from the public gallery towards Tabak, 33, in the dock.
The Dutch engineer kept his head bowed and placed his hands on the top of his head.
The image was shown during the evidence of forensic scientist Tanya Nickson, who examined bloodstains found on a wall next to where Miss Yeates was found on Christmas morning on Longwood Lane, in Failand, North Somerset.
She said the blood pattern indicated smearing rather than splattering - meaning it was unlikely that Miss Yeates had been assaulted on Longwood Lane.
Forensic scientist Lindsay Lennen explained how she examined DNA samples taken from Miss Yeates's body, her clothes and from the boot of Tabak's Renault Megane car.
Tests showed that both Miss Yeates's and Tabak's DNA were recovered from her body and that it was statistically one million times more likely it was their DNA than others.
Tabak's and another unidentified person's DNA was also found on Miss Yeates's jeans - behind her knees - which would have been consistent with Tabak carrying her body, the court was told.
Ms Lennen said the statistical interpretation of the results from Miss Yeates's jeans showed that it was 1,100 times more likely that the DNA was from Vincent Tabak and another person, rather than two unknown people unrelated to the defendant.
The analysis of DNA recovered from the boot of Tabak's car showed a match to Miss Yeates and there was less than one in one billion chance that it was not her blood.
Jurors also heard evidence from Detective Constable Geoffrey Colvin, who had arrested Tabak before dawn at a flat in Aberdeen Road, Cotham, Bristol, where he had been staying.
He described Tabak's demeanour after he had cautioned him.
"He appeared to be quite shaky after I said the words and a little bit shaken," Mr Colvin said.
The officer added that Tabak said nothing in response to the caution.
Miss Yeates is said to have suffered 43 injuries at the hands of Tabak at her flat in upmarket Clifton on December 17 last year.
Her body was found "in a foetal-type position" in Longwood Lane, Failand, North Somerset, by a couple walking their dogs.
The case was adjourned until tomorrow when the prosecution case is expected to finish.