The jury at Preston Crown Court was told that the boy's admission was made in a Liverpool police station, with his parents present.
The 10-year-old boy's parents had told him they loved him, embraced him and urged him to tell the police the truth. He then admitted killing James a week earlier.
Boy B, who may not legally be identified, said to a detective: 'What about his (James's) mum? Will you tell her I'm sorry. I was going to give myself up.'
In three subsequent tape recorded interviews, played yesterday to the jury, B described James's death on a railway line in Walton, Liverpool.
He recounted how James was taken from the Strand shopping centre in Bootle, was hit with bricks, struck with an iron bar, and stripped of his trousers and underpants.
But B insisted the attack was mostly the responsibility of his companion, boy A. 'He done all of it mainly,' B told police.
The boys, now aged 11, plead not guilty to the abduction and murder of James, and the attempted abduction of another child on 12 February.
The prosecution completed its evidence yesterday, the 13th day of the trial. The defence is not intending to call evidence.
Boy B said during his interviews that he thought James was lost when the pair saw him at the precinct. They took James outside to a canal. He was saying he wanted his mummy. Boy A threw James to the ground, hurting his head, and wanted to throw him in the canal, B claimed.
They then took him to the railway track and began throwing bricks at him. 'A said (to James) is your head hurting? . . . and he said we'll get a plaster on, and lifted this brick up and threw it in his face,' B said.
James was hit with an iron bar. He bled profusely. B said he only threw 'teeny little stones' aiming to miss. 'I was saying stop it, stop it. I said let's go now.' He thought his actions had been 'terrible'.
The trial continues today.Reuse content