Joanna Yeates's killer admitted his crime to a prison chaplain but was angry when told his confession would be passed on, a court heard.
Salvation Army member Peter Brotherton told the jury he shook hands with Vincent Tabak before the defendant told him: "I have got something to tell you that is going to shock you."
Tabak, who had been under 24-hour supervision at HMP Long Lartin, was said to have told Mr Brotherton of his intention to plead guilty on 8 February, three weeks after his arrest.
Appearing at Bristol Crown Court, 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, which the Dutch engineer offered on their third meeting.
"I'm not going to tell you anything else," Tabak was said to have told Mr Brotherton.
Tabak, 33, admits the manslaughter of Ms Yeates but denies murdering her on 17 December last year. The trial continues.