A man killed his "best friend" in an attack on a busy city centre street during an international arts festival, a court heard.
Matthew Adams lashed out at Wayne Elliot on Edinburgh's Princes Street resulting in the victim hitting his head on the pavement.
The High Court in Edinburgh heard that Adams, 38, told a witness after the lethal assault: "We're friends. He'll be up in a minute. We don't need police."
Mr Elliot, 53, was taken to Edinburgh Royal Infirmary and admitted to intensive care but he died three days later after a decision was made to take him off a ventilator.
A CT scan revealed that he had a large amount of blood around his brain and after a post mortem was carried out the cause of death was given as complications from blunt force head trauma.
A judge was shown footage of the fatal assault after Adams admitted killing Mr Elliot by repeatedly striking him on the head, causing him to fall and strike his head on August 13 last year.
Lady Poole said: "I can see there are quite a few passers-by there and people coming to help and it is on Princes Street - quite a busy street."
The court heard that Adams, of no fixed abode, has a criminal record from England that includes assault, possession of an offensive weapon, stalking and harassment.
He previously lived in Portsmouth and knew his victim through the homeless community in the south of England.
Advocate depute Gavin Dewar said: "The accused and Mr Elliot had travelled north with the intention of begging during the Edinburgh Festival."
The prosecutor said that on the day of the fatal attack they made their way to the west end of Princes Street and sat at a bank premises. Both appeared to be highly intoxicated.
Mr Dewar said: "The Crown accepts that during their time together in the doorway Mr Elliot stole a quantity of alcohol from the accused and urinated up some steps."
"Urine flowed down the steps and onto the accused's possessions, including a sleeping bag, and the accused became furious.
"The accused remonstrated with Mr Elliot about what he had done. The men engaged in a tit for tat struggle in which the accused was the principal aggressor," he said.
The prosecutor said passers-by heard a crack or a thud sound as the assault victim's head struck the ground. A call was made to emergency services.
Adams went to Haymarket railway station and travelled north to Inverness and told his parents that he intended to hand himself in to police. He did not hand himself in but was arrested by officers in Inverness.
Defence solicitor advocate Iain McSporran KC said Adams had adopted "a pugilistic approach" and struck his victim two blows, but his victim was knocked down by his shoulder rather than by a punch.
He said the greatest punishment that Adams would suffer was the loss of a man he regarded as his best friend.
Lady Poole deferred sentence on Adams for the preparation of a background report following his guilty plea to culpable homicide. Adams followed the court proceedings via a video link to Saughton prison where he is detained.
Don't miss the latest news from around Scotland and beyond - Sign up to our daily newsletter here.