A judge has sentenced a Ceredigion school teacher to a three-year sex offender's programme after he indecently assaulted a teenage pupil.
Judge Morton said Hosken failed to resist "an immature" crush
David Hosken, 32, was found guilty of a single offence of touching a sixth-former's leg above her clothing.
Music teacher Hosken was found not guilty at Swansea Crown Court of four other accusations of indecent assault.
Hosken, from Rhydyfelin, near Aberystwyth, also has to register as a sex offender for the next five years.
Hosken had denied touching the teenager on five occasions while in a position of trust.
But the prosecution claimed he touched the sixth former, kissed her on the lips, sent her text messages addressed to "babe" and signed "love you", and once wrote he would like to do something to her "that could put me in jail".
On Wednesday, Judge Christopher Morton said Hosken and the teenager had become infatuated with each other and Hosken had failed to resist "an immature schoolgirl crush".
He said the girl was over the age of consent, but Hosken had been in a position of trust and that made the touching a crime.
Catherine Rees, defending, said the case had had a devastating effect on Hosken's life.
She said: "He is a talented man and was of good character, free of blemish.
"Teaching was a vocation for him and all that is at an end.
"And it looks as though his relationship of many years is at an end."
Miss Rees said Hosken had already resigned from the school but officials intended taking disciplinary action against him.
Passing sentence, Judge Christopher Morton said the offence did not merit a prison sentence and he would not ban Hosken from working with children.
"It is clear that she developed an immature schoolgirl crush on you and you, flattered, responded," he added.
He said Hosken would not have to pay prosecution costs as he had been acquitted of four of the five charges, and the judge refused an application for compensation made on behalf of the sixth-former.
Hosken had told the jury he had been "completely stupid" and "unprofessional" in sending the teenager mobile telephone text messages which could have been considered to be suggestive.
But he denied there was a sexual motive in his relationship with her.