/ Updated 
By Chris Fuchs

A Muslim congregation alleges that a New Jersey zoning board yielded to community animus and discriminated against them when it turned down a bid to open a mosque in the city of Bayonne in a new federal lawsuit.

Bayonne Muslims argues in court papers filed Thursday that despite four out of seven zoning board members voting to approve its application, the body ultimately barred the group in April from converting a former factory and warehouse it had purchased into a mosque.

Three public hearings between January 2016 and March 2017 attracted large crowds of Bayonne residents, many of them opposed to the mosque, the lawsuit said.

A rendering of the exterior of the proposed mosque in Bayonne, New Jersey, taken from court documents.

The rhetoric at times turned heated, though some spoke in defense of the group. Some opponents, according to court papers, yelled at Muslims to “go back to where you’re from,” while one urged the board to evaluate Muslims’ beliefs because some passages in the Quran direct them to kill.

Bayonne Muslims claims its application was treated more harshly than those filed by Christian churches in meeting zoning requirements for houses of worships in residential areas, court papers said.

RELATED: New Jersey Township Votes to Settle Lawsuits Over Years-Denied Mosque

It also accuses the zoning board of insisting that Bayonne Muslims provide far more parking for its proposed mosque than what is required under law, according to the lawsuit.

“As is happening in towns across America, phony zoning issues were used to block our mosque because of bigotry against Muslims,” Bayonne Muslims president Abdul Hameed Butt said in a statement Thursday. “The Zoning Board subjected our application to completely different standards than those it applied to Christian churches.”

A Muslim congregation in New Jersey is suing the zoning board of the city of Bayonne over a denied mosque.

John F. Coffey II, law director for the City of Bayonne, which is named in the suit, told NBC News he received the court papers Thursday afternoon but declined to comment, citing pending litigation.

An attorney for Bayonne’s zoning board did not immediately respond to a phone message Thursday seeking comment.

The allegations raised in court papers by Bayonne Muslims come just days after a New Jersey township voted to settle two federal lawsuits alleging it discriminated against the Islamic Society of Basking Ridge when it rejected its application to build a mosque.

The law firm for the Islamic society, Patterson Belknap Webb & Tyler, is also representing Bayonne Muslims.

Photos of the current state of a property purchased the Bayonne Muslims congregation to build a mosque taken from court documents.

Between 2008 and January 2017, Bayonne Muslims rented two rooms in the school basement of a Bayonne Catholic church for prayer services and religious education, court papers said. Looking for a permanent spiritual home, the group bought an abandoned warehouse in 2015 for around $1 million, according to the lawsuit.

While Bayonne, a city just a stone’s throw away from Manhattan, has nearly three dozen Christian and Jewish houses of worship, it lacks a permanent mosque, court documents said.

But even before Bayonne Muslims formally announced its plans to build a house of worship, opposition toward the proposal began to mount, according to the lawsuit.

Online petitions and Facebook pages against the mosque began appearing, court papers said. Boycotts of Muslim-owned businesses in Bayonne were also encouraged through ads taken out in a local newspaper, according to the suit.

And the walls and windows of the church school basement where Bayonne Muslims worshipped were spray painted with “F**K MUSLIMS,” “F**K ALLAH,” “F**K ARABS!” and “DONALD TRUMP,” court documents said.

A Muslim congregation is suing the zoning board of the city of Bayonne, New Jersey, over a denied mosque.

Hostility carried over to the zoning board meetings as well, the lawsuit alleges. The board was tasked with reviewing three variance requests that Bayonne Muslims filed in order to build its mosque.

One of them involved granting an exception to certain land-use regulations for houses of worship in residential areas, court papers said. While the board voted 4-3 for that variance, it failed to get the five votes needed for approval, the lawsuit said.

For that variance, the group alleges the board based its decision on such considerations as traffic and parking and whether a mosque was appropriate in that neighborhood — “factors having no relevance to the setback (distance from building to property line) and buffer requirements” in the ordinance, court papers said.

Those same setback and buffer variances requested by Bayonne Muslims have in the past been granted to Christian churches, the suit alleges.

A rendering of the parking lot of the proposed mosque in Bayonne, New Jersey, taken from court documents.

While two other variances, including one for parking, received 4-3 votes in favor of approval, “the zoning board’s resolution nonetheless deemed those variances denied,” the lawsuit states.

Meanwhile, Bayonne Muslims remains without a place of worship since its lease at the school basement was up in January and was not renewed, according to court papers.

The group’s lawsuit accuses the City of Bayonne and its zoning board of violating the state and federal constitutions, as well as the Religious Land Use and Institutionalized Persons Act, known as RLUIPA. (35)

The act, among other things, prohibits zoning and landmarking laws that discriminate against assemblies based on religion or totally exclude them, according to the Justice Department.

A figure taken from a Department of Justice report detailing the breakdown of religions in suits filed under the RLUIPA from September 2010 to June 2016.

In recent years, the number of RLUIPA suits filed by the Justice Department involving mosques or Islamic schools has risen sharply — from 15 percent, between 2000 and 2010, to 38 percent, between September 2010 and July 2016, according to a Justice Department report.

In its suit, Bayonne Muslims is asking that its denied application be ruled unconstitutional, and that preliminary and final approval be granted for the mosque’s site plans. (189)

The suit also seeks unspecified compensatory damages and the appointment of a federal monitor to ensure the City of Bayonne and its zoning board complies with federal law. (189)

“This is my city, just as much as any other resident,” Bayonne Muslims vice president Khaled Aly said in a statement. “We will fight for the rights that our Constitution gives every American.”

Follow NBC Asian America on Facebook, Twitter, Instagram and Tumblr.