A British man who admitted to having sex with a goat has been banned from every farm in the country as part of his punishment as he awaits sentencing.

Robert Newman, 23, of Devizes, Wiltshire, initially denied having sex with the goat but then admitted to committing the act shortly before his trial was to start.

The 23-year-old pleaded guilty to an act of sexual penetration in North West Wiltshire Magistrates Court in Chippenham and was released on bail, the Evening Standard reported. A judge ordered Newman to stay away from farm animals and to stay indoors from 7 p.m. to 7 a.m.

The order will be in place until Newman is sentenced on Sept. 12, Metro reported.