At St Albans Crown Court Ms Fox pleaded guilty to four counts of sexual activity with a child while in a position of trust. She is not allowed to visit the school or have contact with anyone under 16 and will also be placed on the sex offenders register, said Judge Michael Baker QC.

Ms Fox's barrister, Dee Connolly, requested an adjournment in the case to allow for a pre-sentence report. Released on bail, Ms Fox will be sentenced on 5 September. Under current sentencing guidelines she could go to prison for between three and seven years.

Although the identity of the female student is protected, Judge Baker agreed to the defendant and school being identified.

"It is clearly in the public interest to identify the school as well as the defendant," said Judge Baker. "It is, to my knowledge, by no means a small school. I don't see how the identification of the school leads to the identification of the child."

Earlier this year, teacher Hayley Louise Southwell, 26, was charged with having a sexual relationship with a girl aged 15. She admitted the offence and was placed on the sex offenders' register.

In 2009, teacher Helen Goddard was found to have had a relationship with an underage girl at the £13,000-a-year City of London School for Girls. Goddard was jailed for 15 months.

Founded in 1788 in east London for the children of freemasons, the Royal Masonic School for Girls moved to Rickmansworth in 1934. Day and boarding pupils are taught at the school, whose former students include Amelia Warner and Wendy Richard.