A man accused of murdering the homeless Raymond Ward in Scunthorpe appeared on the street a few hours later wearing a blood-spattered top, a jury said.
Dion Hendry 24 denies murdering Mr. Ward, 51, in a Cliff Gardens building on July 9 last year.
He was found dead under a pile of blankets in a redundant social services building and had multiple injuries to his head, face, and back.
Prosecutor David Brooke, QC, told the Hull Crown Court jury that witnesses Hendry saw a bloodstained top.
He also drank from a can, which was later retrieved and forensically examined.
Mr. Brooke said the can has traces of his DNA and Mr. Ward's blood.
Hendry had told the police in an interview that he had last seen Mr. Ward at midnight on Sunday, July 8, and had not seen him afterwards.
He admitted to the police that he had gone to another unknown location and taken "snowballs" – a cocktail of heroin and crack cocaine.
Brooke said, "He insisted he had been in the house the last night last Saturday, denying any involvement in the death and, in particular, not being there between midnight and 4am."
He added, "When asked about his clothes, the defendant confirmed that he wore shorts that night, and we can see that on the CCTV.
"The CCTV footage also picked up the defendant the next morning in the surrounding streets and shops in shorts, including in the area of the house at 9.15."
Mr. Brooke said a real estate agent sitting in his nearby office saw a man wearing shorts in front of the house.
He said he "seemed to be a tramp and behaving suspiciously".
The prosecutor said there were also witnesses who saw the accused with blood on him.
"A dispenser at the pharmacy, Jahoots, on the same street, Oswald Road, serving him at 9.30, said he looked bloody," said Mr. Brooke.
The prosecutor told the court that CCTV material handed over to Humberside police showed Hendry to the Forge project in Scunthorpe. There he showered and got clothes to change. His old top, which was seen on CCTV with bloodstains, was pinched and never followed.
He said, "Although none of the garments Hendry wore that night were found, the witness who had seen him in the alley recovered and gave the police the can that Hendry had thrown to the ground The defendant and Mr. Ward were recovered from some patches. "
According to prosecutors' relatives of homeless people Peter Jackson and William Campbell, Brooke said there was a dispute over drugs that led to a threat.
He told the jury, "There was a time when Hendry told him he thought someone had stolen his drugs, asked Mr. Jackson to watch while he was putting some drugs on the floor, and then retired in the dark to see what happened.
Ward reached for the drugs, whereupon Hendry obviously believed that Mr. Ward was the thief, attacking him and repeatedly slapping him in the face.
Ward refused to steal anything. Hendry yelled at him and said he would kill him if he did not admit it. Mr. Jackson could see that Mr. Ward was bleeding.
The court heard that Hendry later received Mr. Ward's bank card and asked for his PIN number. CCTV footage later revealed that Hendry and her staff went to various ATMs in the city center of Scunthorpe, but they did not receive cash.
The prosecution said Hendry returned to Mr. Ward in the Cliff Gardens compound.
Mr. Brooke said, "Hendry got angry at Mr. Ward because he thought he was going to insult him (giving the wrong PIN number)."
Mr. Ward's body was found when the homeless John MacFadyen broke into the redundant building of Cliff Gardens and searched for a blanket.
When he picked up a blanket, he found Mr. Ward dead. He ran to a nearby pub where the staff was ringing 999.
The process, which is expected to take eight days, will continue.
Follow or contact Grimsby Live
Contact us: E-mail to the reporter who wrote this story.
Follow Grimsby Live on Facebook – Like our Facebook page, to get the latest news in your feed and to participate in the lively discussions in the comments. Click here to give it or tell us a comment or a story
Follow us on Twitter – For current news and the latest stories click here Follow Grimsby Live on Twitter,
Follow us on Instagram – On the Grimsby Live Instagram page, we'll be happy to show you great pictures from our region – and if you tag us in your posts, we could post your image on our page. Click here to follow Grimsby Live on Instagram.