MAHWAH — A New Jersey town accused of discriminating against Orthodox Jews from nearby New York state approved a settlement Tuesday with a group that sued over a religious boundary built with white plastic piping on utility poles.

Mahwah Township's council voted 5-2 Tuesday to settle the suit from the Bergen Rockland Eruv Association after two hours of private legal discussion, the Record reports . The settlement will remain confidential pending approval from the group, says Mahwah Township Attorney Brian Chewcaskie.

The lawsuit was sparked by a now-reversed township ordinance that would have effectively banned the building of an eruv, a religious boundary that some Orthodox Jews rely on to perform tasks on the Sabbath including carrying bags and pushing strollers.

The eruv ban and a separate ordinance that would have restricted parks and playgrounds to local residents were reversed in December after Mahwah was sued by the state attorney general.

The ban was prompted by some town residents' complaints about overcrowding at the parks and their use by Orthodox Jewish families coming from towns across the nearby New York border.

The Bergen Rockland Eruv Association alleged the ban was an attempt to keep Orthodox Jews from New York out of Mahwah. The eruv association received licenses from the utility company Orange & Rockland before installing the pipes, according to group's attorneys.

Many Mahwah residents voiced concerns during the legal fight that the expanded eruv meant an influx of Orthodox Jews along with overcrowding and a stressed school system similar to Lakewood. Democratic U.S. Sen. Cory Booker labeled the opposition as anti-Semitic.

Council President Robert Hermansen, who has denied the measures were motivated by anti-Semitism, said that the settlement was the best option for the township.

"This is a good town with good people, and we're making this decision for good people," said Hermansen.

Council members Janet Ariemma and James Wysocki voted against the settlement. Some residents who attended Tuesday's meeting called on the council members to fight against the eruv all the way to the U.S. Supreme Court if needed.

"I know the judge and the New Jersey attorney general are trying to force you to resolve this matter immediately. Do not bow to their attempts to coerce action," said resident Ralph Fusco. "You have an army of people ready to support you."