(Reuters) - A Pennsylvania town settled a lawsuit brought by the U.S. Department of Justice that alleged the town illegally denied plans for a proposed mosque, the department said on Tuesday.

Bensalem, Pennsylvania, did not admit wrongdoing in resolving the Justice Department’s lawsuit. The town will also pay $250,000 to settle a separate lawsuit filed by the Bensalem Masjid, the group that had sought permission to build a new prayer center. “Masjid” is Arabic for “mosque.”

The agreement paved the way for the group to build a mosque once it secures the necessary permits from Bensalem, a town of about 60,000 people bordering northeastern Philadelphia.

“The Bensalem Masjid is very pleased that a solution could be achieved, and looks forward to building a place of worship that can serve its members and their children for generations to come,” Manzoor Chaudhry, a spokesman for the group, said in a statement.

Acting Assistant Attorney General John Gore, head of the Justice Department’s Civil Rights Division, said, “Federal law protects the rights of all religious communities to build places of worship free from discrimination.”

The organization, which included 200 families as of 2014, had sought to build a 16,900-square-foot (1,570-square-meter) building.

The Justice Department complaint, which was filed in July 2016, said the town’s zoning board treated the group more strictly than other organizations that had made similar applications.

The group went through six public hearings and answered more questions than typical before the zoning board unanimously denied their request in 2014, according to the lawsuit.

A lawyer for the town, Joseph Pizzo, said in a phone interview that the town’s decision to settle the litigation was largely a financial one, noting that the Bensalem Masjid lawsuit had sought close to $5 million in damages.

He also pointed out that the town had approved zoning variances for a separate mosque in 2015 and said the denial that led to the litigation was based solely on the merits of the application.

“Peace is very much a part of the fabric of our community, and it is no small coincidence that the very name of our community, Bensalem, includes the word ‘salem,’ or ‘peace,’” the town said in a statement.