Mr Barclay died in January 2009 after being shot in the head
A murder accused told a friend that his sister's boyfriend had shot himself, a court has heard.
Martyn Barclay, 26, died in hospital in January 2009 after being found with head injuries.
The High Court in Edinburgh heard Paul Igoe, 37, had woken a friend after a night's drinking to tell him Mr Barclay had shot himself.
Mr Igoe, or Hunter, and his 32-year-old sister, Caroline Igoe - Mr Barclay's girlfriend - both deny murder.
Witness Kenneth Carruthers, from Penicuik, Midlothian, told the court how he had fallen asleep in the living room of Mr Igoe's home.
He said: "I heard the front door go at one point.
"I remember Paul shaking me by the arm. He just said Martyn had shot himself."
Mr Carruthers said Mr Igoe was wearing trainers with what looked like "spots of blood" on them and was carrying a "heavy looking bag", which he was told contained a gun.
Mr Carruthers, 37, a painter and decorator, also said a "bit of an argument" between Ms Igoe and Mr Barclay had happened earlier at the house.
"I heard Martyn say he was going to smash Caroline's mum's windows," he said.
But he added that he later heard Mr Barclay say he would not really do that.
Mr Carruthers said he resumed drinking when he woke in the morning at his friend's home in Walter Scott Avenue, Edinburgh.
He told the court he later opened the blue bag and picked up the gun, as he did not know whether it was real.
He put it back in the bag and went back to drinking, he added.
Mr Carruthers said Mr Igoe's brother Joseph later had the bag and asked if he wanted to "chum him".
He said he remembered being in woods but added: "I didn't see the gun going in the hole."
Mr Carruthers was formerly a co-accused of Paul and Caroline Igoe, after denying firearms charges and attempting to pervert the course of justice, but the Crown withdrew the charges.
The Igoes have also denied firearms charges, involving possession of a gun, and attempting to defeat the ends of justice.
The trial before Lord Bracadale continues.