A proposed mosque that had been blocked by officials in a New Jersey suburb will now be allowed to move forward after settlements were reached on Tuesday in lawsuits that accused the township of discriminating against Muslims.

Officials in the suburb, Bernards Township in Somerset County, voted last week to agree to the settlements, which will require the township to pay a little more than $3 million.

The township will also have to back down on some of its previous requirements — including a request for more than twice the number of parking spaces originally planned — which were cited in the lawsuits as complications created to stymie the mosque’s construction. In addition, township officials will have to participate in diversity and inclusion training.

The Islamic Society of Basking Ridge, a Muslim organization in an unincorporated neighborhood in the township, bought a four-acre plot in 2011 in an area where zoning permitted houses of worship. It developed plans to build a mosque of more than 4,000 square feet, with a prayer room large enough for 150 people. The group said it tailored its plans so that the mosque would blend into the neighborhood, forgoing a dome and designing its minarets to look like chimneys and be shorter than the steeples of churches in town.