A teacher accused of having sex with a pupil has told a court the boy was not the father of the baby she miscarried.
Kandice Barber, 35, of Wendover, Buckinghamshire, denies child sex offences, including having sex with a child under 16.
The boy, who was 15 at the time, told Aylesbury Crown Court she had told him she might be pregnant with his baby.
In a statement, Ms Barber said her husband was the father of the baby she miscarried.
Earlier the court heard an investigation began at the start of 2019 when the school found out about a topless picture of the teacher which had been shared among pupils.
Ms Barber, of London Road, is alleged to have sent the photo to the boy. She told police her Snapchat account must have been hacked.
In a police interview the teenager, who is now 17, said he had had sex with the teacher in a field, and she had performed sexual acts on him in a car and in woodland.
Giving evidence by videolink, he said: "I didn't tell the school at first because she told me she was pregnant with my child."
He agreed with barrister Nadia Chabat that he said he did not want his child growing up in prison.
Ms Chabat said Ms Barber had had a miscarriage before Christmas, so he would have known she was not pregnant.
He said that he did not know that, and agreed he told the school's head that nothing had gone on between them and he did not have any photos.
The boy said he had not lied, but was "just nervous".
Ms Barber has denied causing a child under 16 to engage in sexual activity; sexual communication with a child; causing a child to engage in sexual activities while in a position of trust; and making a child watch a sexual act by a person in a position of trust.
The trial continues.