A 16-year-old dad hanged himself when his girlfriend confronted him over obscene text messages he'd exchanged with a male teacher.
Teenager Anthony Stubbs, 16, was found in woodland soon after he had been confronted by 18-year-old Charlotte Mason, who had just given birth to their daughter Lily.
Anthony discovered he was going to be a father when he was 15 and had just celebrated his 16th birthday when Lily was born last September.
The primary school teacher, Iwan Harding, 34, has now appeared in court accused of sending Anthony indecent messages.
Caernarfon Crown Court was told he had asked Anthony about the size of his manhood, described him as a 'horny lad' and offered sex.
He also sent indecent images of himself to the teenager along with an explicit video of two men performing a sex act. The pair met through Love Leap, a dating website.
Although users must be 18 to register, Anthony was able to set up an account under the tag 'young, sexy gay'.
Julie Hughes, prosecuting, said Anthony went missing on November 24 last year following the argument with Charlotte.
Tudur Owen, defending, said the case raised 'issues of public concern' because the Crown was alleging that the sending of salacious texts between two individuals amounted to a criminal act.
Mr Owen said: "It's a tragic case [but] there were no fixed plans for the men to meet. A lot of it is effectively fantasy."
Harding, who has been suspended by his school, accepted he sent images and a video to Anthony who, he said, had claimed to be 17.
But he denies sending grossly offensive or indecent, obscene messages between October 7 and 19 last year.
District judge Andrew Shaw reserved his judgement until next month.
Harding, of Llanberis, north Wales, was granted bail with a condition not to have unsupervised contact with a child under 18.