NEW YORK (Reuters) - The U.S. Department of Justice has opened an investigation on a New Jersey city’s rejection of a planned mosque, a spokesman confirmed on Tuesday.

The U.S. Attorney’s office in New Jersey, in conjunction with members of the department’s civil rights headquarters in Washington, D.C., is examining whether officials in Bayonne, New Jersey, properly denied plans to build a mosque, according to Matthew Reilly, a spokesman for the New Jersey office.

The Bayonne Muslims, the group seeking to construct the mosque, filed a federal lawsuit against the city last week.

News of the federal probe came on the same day that another New Jersey municipality, Bernards Township, agreed to pay $3.25 million to resolve allegations by the U.S. government and a Muslim group that the town illegally rejected plans for a mosque.

The agreement between Bernards, which is located about 30 miles (48 km) west of New York City, and the U.S. Department of Justice will allow the Islamic Society of Basking Ridge to build a new prayer facility.

Federal law prohibits local governments from imposing an undue burden on religious exercise through land use regulations. Bayonne officials could not immediately be reached for comment late on Tuesday.

The town’s governing body voted 4-1 last week to approve settling separate lawsuits filed last year by the Justice Department and by the Islamic Society, but the terms of the deal were made public only on Tuesday.

The town did not admit any wrongdoing under the agreements.

The Justice Department complaint said the town’s planning officials deliberately set out impossibly strict requirements that the Islamic Society could not meet, after members of the public raised objections based on anti-Muslim bias.

The Islamic Society spent four years seeking approval, including 39 separate hearings.

“We look forward to welcoming people of all faiths and backgrounds to our mosque,” said Mohammad Ali Chaudry, president of the society.

A spokesman for the town, Michael Turner, said in a statement: “The township maintains that the denial of the planning board was based on accepted land use criteria only.”

Bernards Township will pay $3.25 million in damages and legal fees to the Islamic Society. The law firm that represented the Islamic Society, Patterson Belknap Webb & Tyler, said it would donate the fees it receives in the settlement to charity.

Patterson Belknap also represents the Bayonne Muslims.

The U.S. government has other pending lawsuits against localities over denials of mosques, including in Bensalem, Pennsylvania; Des Plaines, Illinois; and Culpeper County, Virginia.