Jurors in the Alesha MacPhail murder trial have heard that her father sold cannabis to the teenager accused of killing her.
Robert MacPhail, 26, admitted doing deals with the 16-year-old boy who lived on the Isle of Bute.
The teenager – who cannot be named because of his age – denies abducting, raping and murdering Alesha last July.
He has lodged a special defence claiming the crime was committed by a woman called Toni Louise McLachlan.
Mr MacPhail, who is unemployed, said he last sold the drug to the 16-year-old accused a few months before Alesha was killed.
The court heard he stopped supplying cannabis to the accused after the teenager’s mother made a request via her friend.
The jury was told the friend was an aunt of Mr MacPhail’s partner, Toni McLachlan.
Mr MacPhail said he sold cannabis to fund his own use of the drug and used to arrange transactions via Facebook Messenger and other means.
The drug would then be handed over at the bus stop across from his mother’s house or at the front door of the flat, which the court heard always had a key in the lock.
The night before Alesha was found, Mr MacPhail received messages from the accused and the accused’s sister’s account asking for the drug but he said he did not pick up the messages.
He admitted also selling the drug to the accused’s sister but added: “I don’t know if it [the messages] was the pair of them or him from both accounts.”
Mr MacPhail told the court that the night before she died, Alesha came into the room he shared with Ms MacLachlan and had some of his dinner.
She then went to her room to watch a Peppa Pig DVD.
Mr MacPhail last saw his daughter when she got up between 22:30 and 23:00 on 1 July.
He said he went to bed with Ms McLachlan around 23:30 and only became aware Alesha was missing when his parents woke him up around 06:30 the following day.
A frantic search followed and locals joined in when Mr MacPhail’s mother posted an appeal on Facebook.
A passing ambulance gave him cause for concern and he was later taken to the police station to be informed his missing daughter’s body had been found.
The jury heard Alesha had only been a few days into a three-and-a-half week summer break on the Isle of Bute when she was murdered.
‘Loved each other’
At the time she had been staying with Mr MacPhail, his parents and Miss McLachlan in a three-bedroom converted attic flat on Ardbeg Road.
Mr MacPhail, 26, told the court he split up with Alesha’s mother around three months after his daughter was born.
He later started dating Miss McLachlan, 18, and they had been together for two years.
Mr MacPhail said the couple did split up for six weeks but got back together around May last year.
He also told the jury his girlfriend was involved in his drug dealing and both handed over cannabis and collected money from his customers.
Asked by Mr McSporran how Ms McLauchlan got on with his daughter, the witness replied: “Great. They both loved each other to bits. Ever since Toni met her, from day one.”
Earlier jurors were earlier shown pictures of the crime scene.
Prosecutor Iain McSporran QC issued a warning to the jury before the images of the six-year-old with a pile of clothing next to her were shown on public screens in the High Court in Glasgow.
The images also showed the wooded area and the disused hotel on the Isle of Bute where she was found.
A number of people, including relatives of Alesha, left the court before the pictures were shown.
They included photographs and 360-degree images of the wooded area between High Road and Gortans Road on Rothesay, where the body was discovered.
Jurors were previously told Alesha’s naked body was found by a man at 08:54 on 2 July in the grounds of the former Kyles Hydropathic Hotel.
Alesha’s grandmother Angela King had reported the girl missing at 06:23 on 2 July.
Prosecutors allege the accused boy was armed with a knife when he took Alesha from her bed at a house in Ardbeg Road.
It is claimed he carried the schoolgirl to the site of the former hotel, removed her clothes and suffocated her before raping and murdering her.
The teenager faces a separate charge of attempting to defeat the ends of justice by disposing of clothes he had been wearing.
The trial continues.
Why is the BBC not naming the accused?
It is illegal in Scotland to publish the name, address, school or any other information which could identify anyone under the age of 18 who is the accused, victim or witness in a criminal case
This law applies to social media as well as to websites, newspapers and TV and radio programmes.
However, the name of victims who have died can be published – so the BBC and other outlets are able to identify Alesha MacPhail.
What is a special defence of incrimination?
Ahead of their trial, the accused can lodge a special defence which will result in them being acquitted if it is accepted by the court.
These defences include self-defence (they were defending themselves from attack), alibi (they were somewhere else when the crime was committed) and mental disorder (the accused is not responsible for their actions because they were suffering from a psychiatric condition).
In this case, the accused has lodged a special defence of incrimination – meaning he has claimed that someone else (a woman called Toni McLachlan) was responsible for Alesha’s death.
It will be for the jury to decide whether or not they accept this special defence after hearing the evidence in the case.