Declan Mutch told the High Court in Edinburgh yesterday that Declan Robertson made the admission about killing 17-year-old Brett Lodge, whose nickname was Hancock.
The 19-year-old postman said that Robertson was with co-accused Bradley Lumsden when he bumped into them in the Inch and the pair looked “in shock”.
The court also heard that Mr Mutch gave police a statement that the pair looked “really pale” as if they had suffered a “right fright”.
Mr Mutch was giving evidence on the sixth day of the trial of Robertson, 17, Lumsden, 17, Andrew Parfinowski, 18, and Cameron McKail, 17.
The four teenagers all deny murdering Brett Lodge on July 9 last year and attempting to defeat the ends of justice by trying to hide evidence related to the alleged attack.
Mr Mutch, a former pupil at Holy Rood High School, told the court that he met Brett Lodge – whom he had known since primary school – in the street at around teatime on the day of the murder.
Later, the teenager said he met Robertson – whom he had also known since primary school – and Lumsden on Robert Burns Drive, five minutes’ walk from Claverhouse Drive where Mr Lodge was attacked.
Mr Mutch, who lives in Moredun, said: “I stopped and spoke to him. [Robertson] said, ‘I think I’ve killed Hancock’. He looked serious. I can’t really remember anything else that was said.”
The court heard that Mr Mutch had told police about the meeting on July 22 last year. In the statement, he told officers: “They both looked really pale. Almost as if they had had a right fright.
“They slowed down as they got to us and I asked if they were alright. Declan had his hands on the back of his head. He turned round and began walking backwards facing me and then said, ‘I’ve done something wrong. I think I’ve killed Hancock’.
“I didn’t really take in what he said, I didn’t know what to think. I do remember asking Declan what he was on about but he did not say anything.”
Earlier the court heard from Royal Navy petty officer Alfred Cummings, 40, who described how he went to the victim’s aid as he lay injured.
He said: “I was trying to make him comfortable. My partner had taken Brett Lodge’s hand and was trying to talk to him but she was getting nothing from him.”
Ambulance paramedic Alan Lourie, 50, also told the court how he was called to Claverhouse Drive by a 999 call.
Mr Lourie said that the teenager had suffered a head injury and the paramedic team placed a collar on his neck before taking him to Edinburgh Royal Infirmary.
Mr Lodge later died from his injuries at the Western General on July 9 last year.
The trial before temporary judge John Morris QC continues.