One of the two boys accused of the murder of Ana Kriégel told gardaí he heard the schoolgirl scream after she went into an abandoned house with the other accused boy.
The second boy said when he heard the scream he ran and thought Boy A would be able to handle the situation.
The jury has been watching garda interviews with Boy B, carried out after his arrest on suspicion of murdering the schoolgirl at a derelict house in Lucan on 14 May last year.
Both boys deny murder. Boy A denies violently sexually assaulting the 14-year-old.
The jury is now watching the final interview carried out by gardaí on 25 May 2018, after Boy B had been arrested on suspicion of Ana Kriégel's murder.
He initially told gardaí that he called for Ana on 14 May at the request of Boy A.
He said he and Ana met Boy A in St Catherine's Park in Lucan, that he had tagged along behind them for a while but then got bored and left.
During the interviews he was presented with CCTV footage which he agreed he could see was inconsistent with the account he had given.
In his final interview, gardaí told Boy B he had seen footage of Ana and him walking through a field to meet Boy A at 17:14 on the day and had then identified himself on further footage going in the opposite direction 35 minutes later.
Detective Garda Donal Daly said that was 35 minutes of his life that the boy had not accounted for and the garda said he believed Ana was murdered in those 35 minutes.
The boy denied he had been at the abandoned house where her body was found.
The gardaí told the boy to stop trying to make his story meet the facts and urged him to tell the truth. They told him they had a witness who had seen a boy with a black backpack going into a field at the back of the abandoned house and they believed this boy was him.
Boy B said he had gone into the field to look around but did not go any further.
Gardaí told him he could not keep changing his story as facts and evidence were presented to him.
The boy asked his mother to leave the room but was told that as a juvenile, a parent or guardian had to be present at all times.
The boy said that everything he had said before was the truth but said that when they met Boy A, all three of them went through the fields and Boy A brought Ana to the house and went in with her.
He said he started walking but the other boy said it was fine and he left.
When he was on his way back he said he heard a scream and then ran.
Boy B said it was a really strong scream but just when it was about to end it got muffled.
He cried before telling gardaí he ran because he was scared. He thought Boy A and Ana "got attacked or something" but he thought Boy A would be able to handle the situation because he was strong.
He said he knew right at the moment it was Ana screaming but since Boy A was with her he thought she would be fine and that Boy A would protect her and he ran home.
Earlier, gardaí showed Boy B a picture of Boy A's boots and told him they were stained with Ana's blood. The boy said his friend would not do that.
Told the forensic examination showed the person wearing the boots was someone in the immediate vicinity of the attack on Ana, he said either Boy A did it or was "a stand by" but he did not want to believe it was Boy A.
He was shown a picture of a concrete block and he said he supposed it was "one of the murder weapons".
He told gardaí the newspapers said a rock and sticks were used to kill Ana.
Informed by gardaí that blood and Ana's hair had been found on the rock he said "Jesus Christ it gets worse and worse".
Shown a picture of a bloodstained stick, the boy said "crazy, beaten alive".
Gardaí produced another picture showing tape found at the crime scene.
The boy said "wait a minute, holy s**t, oh my God".
He said he had given Boy A tape a couple of weeks previously. He said it was construction tape, that he himself used to make things at home.
He said Boy A had asked him for quite a bit of the tape as he was making something "pretty big". And he said he had given him a half used up roll and he said "here it is".
Boy B denied that he had brought the tape to the house. He said he was not in the house and he did not know what had happened.
He said he had not been in the house since late the previous year.
The boy told gardaí he had given a "fake story" in a previous interview, because when he was asked by gardaí for the first time about his movements, he could not really remember where he went, as he was "scared and nervous".
He said he "kind of like made up some of it" and then thought he could not change his story.