Married maths teacher Andrew Welsh, 36, was caught when the girl’s mother returned home unexpectedly one morning last July, Bolton Crown Court heard.
Her daughter had ruffled hair and smudged lipstick and, when the mother went upstairs, she noticed a pair of man’s boots at the side of the bed in the 16-year-old’s room, Geoff Whelan, prosecuting, told the jury.
This “understandably aroused suspicion” in the mother, who asked the girl: “What are you doing? Who is here?”
Mr Whelan went on: “However, as that was said, she looked down and saw movement in the drawer compartment within the girl’s single divan bed and the valance sheet folded back.
“She saw movement of material which seemed to match the suit jacket her daughter was holding.
“The girl replied ‘Mr Welsh’.
“Her mother ordered the defendant to get out from under the bed and recognised him from the school.”
The shocked woman called her husband and the police and Welsh was arrested.
He had begun a relationship with the “impressionable” girl last summer while she was taking her GCSE exams, the court heard.
The graduate of St Andrews University bombarded the girl with obscene texts, including: “Have you heard about my maths lesson? We’re going to find out if 35 goes into 16.”
Father-of-one Welsh, of High Bank, Atherton, near Wigan, who is married to a local doctor, admitted six counts of sexual activity with a child while in a position of trust.
Today, he was given a 14-month jail term, suspended for two years, and ordered to do 200 hours of community service.
He was also ordered to sign the sex offenders register for 10 years.