MAHWAH, N.J. — A New Jersey prosecutor has ordered a town’s police department to ignore a new ordinance that he says could illegally target Orthodox Jews.

Bergen County Prosecutor Gurbir Grewal told Mahwah Police Chief James Batelli to ignore the ordinance banning out-of-state residents from township parks. The ordinance went into effect Thursday.

In the directive to Batelli, Grewal warned that the ordinance could lead to racial profiling and unlawful searches and seizures. The ordinance could also illegally target out-of-state members of the Orthodox Jewish community who use Mahwah’s parks, Grewal said.

Grewal’s letter comes after the town ordered a Jewish community to stop installing PVC piping to make a ritual border on utility poles. Township officials have called for the ritual border’s removal, citing zoning regulations that prohibit signs on utility poles.

The piping marks a religious enclosure called an eruv, which symbolically extends the private domain of a Jewish home in public areas – permitting Orthodox Jews to participate in activities banned on the sabbath – things like carrying keys or pushing strollers.

The township adopted the ordinance last month with the aim of curbing the number of outsiders. Council President Rob Hermansen said that the ordinance was not targeting Jews and that the council was simply responding to complaints from residents that Mahwah’s public parks were being taken over by people with New York license plates.

It’s worth noting that the ritual border formed by the PVC piping is used by Orthodox Jews – people who also will not drive on the Jewish Sabbath and therefore would not be responsible for cars with New York license plates at the parks from sundown Friday until sundown Saturday.

Hermansen said the council will rework the parks ordinance in light of Grewal’s directive, but he maintained that the township will put residents first. Mahwah Mayor William Laforet says the prosecutor’s directive would help Mahwah avoid serious profiling lawsuits, and he praised Batelli’s communication with Grewal.

Batelli could not be reached for comment Thursday. Laforet says he expressed reservations about the ordinance to the township attorney in previous weeks

PIX11 contributed to this report.