A 17-year-old youth is on trial at Bradford Crown Court accused of sexually assaulting a girl aged 12.
The teenager, who was 16 at the time of the alleged assault on a day last spring, cannot be named for legal reasons.
He is said to have kissed the child at a house in Bradford and got on top of her to commit the assault.
Prosecutor Nick Askins said the youth stopped when the girl hit him.
She texted a friend to reveal what had happened and when her mother found out, the police were called.
The youth denies sexual assault of a girl under 13, saying nothing happened between them.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article