A witness has told a Sydney jury he heard punching noises and "a sound I cannot describe" after seeing a prisoner grab another inmate and go into a cell with him alone.
After Abraham Ryan Tangi came out of the cell, he later said the phrase "teach him a lesson", the witness - given the pseudonym D - testified in the NSW Supreme Court.
The witness on Tuesday was giving evidence at the trial of 31-year-old Tangi, who has pleaded not guilty to murdering Zaydoun Al-Qaseer, 24, at the John Morony Correctional Complex near Windsor in June 2017.
Al-Qaseer, whose injuries included a fractured skull and bleeding on the brain, was found lying on the floor unconscious before he was taken to hospital where he died.
Witness D said that a few days before Al-Qaseer was attacked he heard him tell Tangi to "get f***ed" during an argument.
Tangi later appeared to be "really, really extremely angry" and said he wanted to "fight him".
The witness saw Tangi standing against the wall outside his cell on June 19.
"I saw someone with a fisherman's hat, I believe it was Zaydoun, and then Mr Tangi behind him very close," he said.
Tangi grabbed the other prisoner with both hands before the pair went into the cell, D said.
The witness said he could not see anyone else in the cell before the door closed and he heard punching noises.
He then heard "a sound I cannot describe" which he elaborated on as sounding like somebody in pain.
When he later saw Tangi he looked nervous and angry and said "teach him a lesson".
The trial continues before Justice Stephen Rothman.
Australian Associated Press