Ocean Township’s protracted battle to block a Yeshiva and dorm for 96 college-age students had nothing to do with concerns about nearby Lakewood’s expanding Orthodox Jewish community, the mayor said.

“This wasn’t about religion,” said Mayor Christopher Siciliano, adding that Ocean itself has a large Jewish community and more synagogues than churches. “It was about preventing the overuse of a property in a residential neighborhood.”

The fight over the 3-acre site on Logan Road in Ocean’s Wanamassa neighborhood came to what looks like a peaceful end on Thursday night, when the township council voted 5-0 to authorize Siciliano to close on a deal to buy the property for $2 million, thus keeping it out of the hands of the Lakewood-based yeshiva and rabbi who had sought to buy the site and use it as a boarding school.

The purchase is intended to insure that whatever the lot is eventually used for will be welcomed by residents, after many had opposed the residential yeshiva plan at township zoning board meetings, with yard signs reading “No dorm on Logan Road,” and on social media.

“I think some of the language was, you might say, colorful,” said Township Councilman Robert Acerra.

The township’s options for the property, Siciliano said, include leasing the existing 1958 school building on the site to the local public school district for $1 a year; selling the property for development into single-family homes, consistent with the site’s zoning; or creating a park that would be entirely handicap accessible, adjacent to an existing park that features conventional ball fields and tennis courts.

Siciliano, who is leading a slate for re-election in Ocean’s May non-partisan elections, said he intends to arrive at a permanent re-use for the property within two years.

Thursday night’s authorization to close on the purchase from the property owner, Zebra Holdings LLC of Lakewood, follows a council vote in January to authorize issuing $2 million in bonds to finance the purchase. Siciliano said it will cost the average Ocean taxpayer about $30 a year to repay the bonds over a decade starting in 2020, unless the township sells the property first and uses the proceeds to pay down the debt.

The township’s acquisition of the site comes despite a 2016 victory in federal court by the Lakewood-based Yeshiva Gedola Na’os Yaakov and Rabbi Shlomo Lessin, which granted the yeshiva the right to open the boarding school after its application was rejected by the township zoning board. The suit was brought under the Religious Land Use and Institutionalized Persons Act of 2000, or RLUIPA, which protects religious organizations from discrimination in land use matters.

The 14,750-square-foot school building on the site was constructed as a yeshiva in 1958, and at one time also served as a dormitory, but for a much smaller number of high school-age students. The more recent plan also proposed containing the dormitory facilities in the school, without a separate dorm building.

Despite winning the discrimination case — and an award of $750,000 paid mainly by the township’s insurance company — the rabbi and the property owner failed to close on their purchase agreement within the deal’s specified time frame, allowing the township to step in with its own offer to buy the property, Siciliano said. He said the school building had been vacant for some time and the owner was eager to realize a return on it.

“I caught him at a good time; he was between tenants,” said the mayor, an agent in his family’s real estate business. “I think it was a golden opportunity and a win-win for the town.”

Neither the rabbi nor representatives of the yeshiva returned calls on Friday. The Washington, D.C.-based lawyer who handled the discrimination suit, Roman Storzer, declined to comment.