The former mayor of Bernards Township, New Jersey had a simple goal: build an Islamic Center where he and his fellow Muslim residents could worship.

What Mohammed Ali Chaudry got instead was a protracted four-year battle with the local planning board, who ultimately rejected his plan for the mosque.

Now Chaudry and his group, the Islamic Society of Basking Ridge (ISBR), are suing Bernards Township and its planning board for allegedly threatening their right to worship under the guise of land use regulations.

The suit, filed Thursday in federal court in New Jersey, charges that the community masked a xenophobic fear of bringing an Islamic house of worship into their neighborhood with concerns about mundane land use issues, such as parking and stormwater management. Planning board members were ultimately swayed by this tide of community opposition, the suit alleges.

“What should have been a simple Board approval for a permitted use devolved into a Kafkaeqsque process that spanned an unprecedented four years and included 39 public hearings,” the suit read. “These proceedings took place against a backdrop of ugly spectacle.”

In a statement made Friday to NJ.com, current mayor Carol Bianchi rejected this characterization.

“Bernards Township is an inclusive and warm community,” Bianchi wrote. “The allegations in the lawsuit do not represent our community. It is not unusual for an applicant to appeal a denial, and it is their right. The Planning Board made its decision and now the court will decide whether to uphold that decision.”

Bianchi was a member of the planning board at the time the mosque plan was rejected.

A citizens group of local residents formed with the explicit aim of preventing the mosque’s construction says its goal is to prevent the “intrusion of intensive non-residential uses” in their neighborhood. On their website, the Bernards Township Citizens for Responsible Development listed concerns including the scale of the project, the proposed lighting, the proposed hours of use and “public safety.”

In a December op-ed on the planning board’s vote to reject the ISBR’s mosque plan, the editorial board of the Bernardsville News also explicitly denied any religious motivation behind the board’s decision.

“In light of the recent political furor over Republican presidential candidate Donald Trump’s outrageous call to ban Muslims from the country, some outsiders were questioning whether the decision here was at least in part based on xenophobia,” the editorial read.

The editorial board wrote that it does “sympathize” with Chaudry but believes he “should have recognized that neighbors of the property were staunchly opposed to the concept of having a religious facility of this size at this particular site.”

Chaudry and the ISBR’s lawsuit counters that they repeatedly revised their proposals to comply with the ever-changing demands of the board. Aware of the hostility over a plan to build a mosque in the neighboring township of Bridgewater, the planners explicitly designed the exterior of the mosque to blend in with the residential neighborhood, adapting minarets that looked like chimneys and lowering the roof line to minimize the building’s “visual impact.”

Still, their final plan was formally rejected in January 2016. A 40-page resolution from the planning board charged that the site has an “aesthetically displeasing fence” and lighting that was too “intense” for adjoining properties, despite the ISBR’s efforts to address these issues.

At least some opposition to the mosque in the community appeared to be motivated by Islamophobia, however. Anonymous flyers were papered around town linking Islam to terrorism during the months that the planning process dragged on, according to the lawsuit.

“Why are so many terroristic acts propagated by Muslims? Is it something they are taught in your mosques and at home?” the flyers read.

The suit also highlighted meeting minutes from the Bernards Township Citizens for Responsible Development that direct members not to explicitly mention Islam while they try to defeat the mosque’s construction:

Local resident Lori Caratzola was not named as a defendant in the lawsuit, but she is frequently cited as one of the most strident opponents of the mosque’s construction. Caratzola is quoted in the suit as telling the board that “100 billion animals are sacrificed in the name of Islam in the United States every year.”

Caratzola appears to be the chair of Sen. Ted Cruz (R-TX)’s Second Amendment Coalition for the state of New Jersey, as well as the New Jersey community leader for American Laws for American Courts at the American Public Policy Alliance. The group focuses on preventing Sharia law from being implemented in the United States.

Caratzola’s Facebook profile is private, but her background photo shows a Gadsden flag waving against a blue sky.

Most of the members of the Bernards Township planning board also have private Facebook profiles. One of them, Paula Axt, shared a video in November 2015 that purports to deliver an “amazing response” to people who say that “not all Muslims are bad.” In the video, anti-Islam author and activist Brigitte Gabriel argues that the “15-20 percent of the Muslim population” who are extremists make up “around 270 million people” and therefore are a cause for concern.

In a Bernardsville News article recapping online reactions to the planning board’s rejection of the mosque plan, residents celebrated the preservation of their township as it is.

“Great decision! Hope this sends a message,” one commenter wrote.

“Thank you planning board,” another wrote. “Let them build it in the Great Swamp at low tide.”

Read the full lawsuit below:

h/t The New York Times