HARTFORD, Conn. — The U.S. Justice Department and federal prosecutors said Thursday that they have reached an agreement with Meriden, Connecticut, to resolve allegations the city illegally rejected an application for a proposed mosque.

Officials had said the Meriden Planning Commission's denial of the Omar Islamic Center's plans for a new mosque last year violated a federal law, the Religious Land Use and Institutionalized Persons Act of 2000. Federal officials also said the city's zoning code treated religious organizations less equally than nonreligious organizations.

The city had denied the allegations.

U.S. Attorney John Durham said the settlement will allow members of the mosque to worship at a new location in city. Officials also said Meriden officials agreed to amend the city's zoning laws to comply with the federal religious land use law, train city employees about their obligations under the law and notify the public about the city's compliance with the statute.

"Our Constitution protects the right of all people in this free nation to exercise of religion," Eric Dreiband, assistant attorney general with the Justice Department's Civil Rights Division, said in a statement. "But that right will mean little if people cannot gather together in a place of their choosing and practice their faith."

Messages seeking comment were left Thursday for Meriden Mayor Kevin Scarpati and lawyers for the city and the mosque.

In rejecting the mosque plan, Planning Commission members had said it would not fit in with surrounding land uses and the application was not in line with the city's efforts to promote commercial and industrial development.

The settlement is in a proposed consent decree — which needs approval by a federal judge — that will resolve a Justice Department investigation that resulted in the allegations as well as a lawsuit also filed by the department Thursday against the city.

Representatives of the Omar Islamic Center have said it has outgrown its location in Middletown and they were seeking to move to a Meriden building that was going to be donated to them by the owner.

The center also is suing the city in federal court. A settlement conference in that case is scheduled for Monday.