The school building has been used as an Islamic Centre since 1996
Plans to demolish a listed Victorian building in Surrey and build a mosque in its place have been approved.
The local Bengali Association has been using the St Gregory's Roman Catholic school building in Camberley since 1996 but said it no longer met its needs.
It sought permission to knock it down, angering local historians who argued the town's heritage must be protected.
Surrey Heath council approved the plans and said there was "a growing need for a new mosque for the Muslim community".
The site is located within the Royal Military Academy Conservation Area.
Brian Townley, the council's head of built environment, said members of the planning applications committee had to balance the need for a new mosque within the borough against the impact of the building within the conservation area.
"Most members felt the need was much greater than the conservation considerations," he said.
"The former school building is locally listed, it's not of national significance."
The school building, which dates back to the 1860s, was sold to the Berkshire, Hampshire and Surrey Bengali Welfare Association, which has been using it as an Islamic Centre since 1996.
Under the plans, the existing building would be demolished and a purpose built mosque with a domed roof and two minarets put up in its place.
Abdul Wasay Chowdury, project manager for the mosque, said the new building would be "very sympathetic to the area".
He said materials for the building would be chosen to compliment the locality.
"We will respect the conservation area and local peoples' views," he said.