An illegal two-storey school extension, put up just five metres from residents’ gardens, will have to be moved to a different site.

The block houses eight classrooms and is to be moved towards the centre of the playing field at Mayespark Primary School, from its location on the edge of the ground.

It was granted full planning permission at Thursday’s regulatory committee subject to its relocation and other conditions being met.

Residents in Westrow Gardens were concerned when they woke up one morning in May and saw the structure erected overnight without full planning permission.

Classroom windows were facing into their gardens.

Mayespark Primary, Goodmayes Lane, Goodmayes, has agreed to place extra trees along the edges of the playing field to protect the privacy of residents.

Vera Wiseman, spokesman for the Seven Kings Bungalow Estate Residents’ Association, said: “We are pleased with the final decision and with the extra screening that will be planted to protect the outlook of residents in Westrow Gardens.

“We do hope, however, that lessons will be learned from this fiasco which has blighted the lives of the residents since April.”

The primary school is adjacent to a conservation area and concerns were raised over how close the building was to the protected zone.

Mayfield ward Cllr Jas Athwal said: “It was unacceptable when it was that close to people’s gardens.

“However, we also have a shortage of school places that we need to balance and we need to take this into consideration.

“I think the decision was a good one because it means that the school building is 40 metres away and when you stand in your garden, it will not be right there.”

A council spokesman said an exact date for the building’s move has yet to be decided while details are finalised.

She added it has a “legal duty” to find school places in the borough.