A woman discovered her daughter was having sex with a teacher after she found him hiding under the teenager's bed, a court has heard.
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?"
The girl's mother saw movement under the bed and 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.