A school has been forced to shut to most students after travellers set up camp in the car park.
Shenley Academy in Birmingham said it was closed to all Year 7, 8, 9 and 10 pupils after travellers ignored an eviction notice issued on Saturday.
The group which officers said included 20 caravans, a horse and dogs, has now left the site.
West Midlands Police said it had helped evict the group after the city council served an immediate eviction demand.
The academy remained open to pupils in Years 11, 12 and 13 who were told to avoid using the main entrance and were escorted on to the site by police and staff.
School principal Lucy Monk said of the partial closure: “I recognise that this situation is detrimental to the education of our students, and it is certainly not a decision which has been taken lightly.”
Mrs Monk said in a statement later, the travellers had left the site and all students could return to school on Tuesday.
Margaret, from the group of travellers, told the BBC more traveller sites were needed.
“If there were more sites this wouldn’t happen, she said. “There’s going to be an awful lot more of this up until summer until the kids break up from school.”
“There’s no uproar about these children [from travelling community] not going to school or not having a home for themselves to live in,” she added.
However, local police sergeant Dave Cotter said the travellers’ behaviour was “totally unacceptable” and had caused huge disruption.
“The group ignored a notice to leave, which gave them 24 hours to move on, and in the end we were left with no option but to force them to leave the school grounds,” he said.