The 16-year-old boy accused of the abduction, rape and murder of Alesha MacPhail has denied being a “confident liar”, after he told a court he had no involvement in the crimes.

He told the high court in Glasgow: “I didn’t even know her name until everything happened,” and answered “no” and “absolutely not” as his defence lawyer took him through the charges on Tuesday.

Challenged under cross-examination that his story was a “complete fabrication”, the teenager insisted it was “100% the truth”.

The advocate depute Iain McSporran, prosecuting, told the accused: “Somebody brutalised Alesha McPhail,” to which he replied: “It’s not me. I would never do something like that.”

McSporran continued: “You murdered and raped her. The reason your semen is in her vagina and your DNA is all over her is that you are the person who killed her.”

The accused replied: “No.”

McSporran said to the teenager: “Would you agree you were a confident liar?” The accused replied: “No.”

The teenager remained calm and articulate even under intense questioning as he gave evidence for more than two hours, and on two occasions refused breaks offered to him by the judge, Lord Williams.

Alesha, from Airdrie in Lanarkshire, was found dead last July in the grounds of a disused hotel near her grandparents’ seafront home, close to Rothesay, where she had arrived a few days earlier for a three-week summer break.

She was last seen by her family at about 11pm on 1 July. Her grandmother Angela King reported her missing at 6.23am the next day and appealed for help on Facebook. A member of the public found Alesha’s body approximately half a mile away at about 9am.

The accused has named Toni McLachlan, the girlfriend of Alesha’s father, Robert MacPhail, as the person responsible for the murder, claiming she took a used condom to plant evidence on the child’s body.

On Tuesday morning, a forensic scientist who had examined the dead girl told the court that DNA matching the 16-year-old was found all over Alesha’s body and it was “highly unlikely” this amount of evidence could be the result of transfer by a third party.

Last week, the court heard the schoolgirl had sustained “catastrophic” injuries to her genital area.

Asked by Brian McConnachie, defending, if he knew how his DNA came to be on Alesha’s body, the 16-year-old said: “I think so … that Toni took that condom when I left and she went and killed her.”

The accused had earlier told the court he met McLachlan and had sex with her using a condom during the night Alesha disappeared.

He then insisted he had lied to police about his whereabouts during that night in order to protect McLachlan because she had told him that her partner, Alesha’s father, was abusive towards her.

The accused offered the court alternative explanations for all the points of evidence put to him by the prosecution.

Asked why he had sent a video of himself to friends in a Snapchat group with the message “found the guy who’s done it” the afternoon after Alesha’s body was found, he said: “People were talking about who might have done it and one of my friends said my name and I didn’t want to take it to heart, so I just thought I would build on it.”

McConnachie suggested: “You were making people know you were responsible,” but the teenager replied: “No, we didn’t even know it was a murder at that time, we were just speculating.”

He also gave an explanation for why CCTV footage showed him leaving his family home three times during the night Alesha went missing. He said that after he had returned home from meeting McLachlan he had taken a shower, then realised he did not have his phone with him and rushed back outside to look for it in panic, because his parents were angry with him for breaking previous phones. He realised it was too dark to find it and so returned to get a torch and shoes, before going out a third time.

The trial continues.