A graphic of the proposed new mosque in Dudley
The government has given permission for a new £18m mosque and community centre to be built in the West Midlands.
Dudley council turned down the application to build the mosque the grounds the land had been designated for employment purposes.
The town's Muslim Association appealed to the government's Planning Inspectorate which has given the go-ahead for the project.
A Muslim Association spokesman said the mosque would bring people together.
Mushtaq Hussain, of the Dudley Muslim Association, said the new mosque would replace the current one at the Castle Hill site.
"The community has grown over the last 20 years and we need a replacement centre," he said.
The council received hundreds of letters from residents opposing the mosque.
A statement issued by the council said: "The planning inspectorate has today allowed the appeal by Dudley Muslim Association over its application for a mosque and community centre in Hall Street, Dudley.
"The decision followed an independent inquiry run by the planning inspectorate."