The alleged victim had become upset when memories of what Brian Chenery had allegedly done to her came “flooding back” while she watched a sex education video at school, Ipswich Crown Court was told.
Her allegations were reported to the police and when the girl, who was 13, was medically examined it was discovered she had chlamydia, said Emma Nash, prosecuting.
She said the girl told officers she had no sexual experience other than what Chenery had allegedly done to her.
The court heard that Chenery’s medical records showed that he had tested positive for chlamydia, which Miss Nash said was a sexually transmitted disease.
Chenery, 42, of Hervey Street, Ipswich, has denied two offences of raping a girl under 13 and two offences of sexually assaulting a child under 13.
The court heard that after his arrest Chenery denied the allegations.
The trial continues.