A boy who attended the end of exams party held by a 16-year-old lad accused of raping and killing Alesha MacPhail told a court the teen was “suicidal” on the night of the abduction.

The school friend requested that screens were removed so he could see the boy in the dock.

The witness, also aged 16, told the court he believed it was an “unlucky coincidence” that the accused was out of the house the night of the murder.

And he attended the boozy party held by the accused, which ended in a row between the boy and his mum.

Read more: Alesha McPhail murder accused posted Snapchat to friends video showing his body in mirror

The child witness said the accused confided in him that he was worried about his mother’s drinking.

The witness recalled: “He was face down on his bed.”

“He said he was depressed and was thinking about doing things to himself - harming himself.”

Around 15 teens had attended the party, which finished before 12.30am, the witness told the court.

He said the accused was wearing a tie-dye t-shirt, ‘Hype’ jogging bottoms, and that he put on a black Nike zip-up hoodie after saying he was going out to buy drugs.

When shown a picture of the black Nike hoodie found in a rock pool by a dogwalker, the witness agreed it looked similar.

The witness said he had seen the video showing the accused in a bathroom, where he said ‘I know where the murderer’s been hiding’.

The friend said: “At the time I thought it was just a joke, he had a dark sense of humour.”

He recalled that when the youth was first arrested, “a lot of people jumped on the bandwagon”.

Read more: Alesha MacPhail: Mum of 16-year-old accused of raping and killing girl refuses to watch his trial continue

But he told the court he believed the arrest was just an unlucky “coincidence” of him “being out buying weed at a dodgy time”.

Defence brief Brian McConnachie QC showed Snapchat messages to the court.

The accused had written in one message ‘Aye a wee autopsy and they will know exactly what happened’.

When asked whether he thought the accused’s mother had a drinking problem, the witness said: “I don’t know - I don’t have an opinion on that.”

Read more of today's top Glasgow stories

Another 16-year-old denied selling the accused cannabis on the night of the murder.

When asked by Mr McSporran if he had sold the accused cannabis in the early hours of July 2 at his house, the witness replied: “No”.

Mr McSporran asked him about the accused’s physique and if he lifted weights, and the boy said: “Yeah he’s in good shape.”

The trial adjourned until Monday.