A national controversy is building over a plan to build a mosque near the site of the former World Trade Center in Manhattan.

But in Portland the approval process for an Islamic house of worship has led to a permit for a worship space — as it should have.

It’s not that there weren’t some hitches in the process — including the filing of a federal lawsuit by the Maine Civil Liberties Union that led to a consent decree permitting worship to be held pending the Planning Board’s decision on the matter.

But that all worked out, and now the Islamic Masjid and Islamic Center on Washington Avenue, a project of a group of Muslims who are mostly refugees from Afghanistan, is good to go. About 15 families worship there, meeting at noon on Friday, which is Islam’s holy day.

The worship center hit a speed bump last year when its congregation, meeting in a former TV repair shop, was found to be in violation of city zoning rules because the lot was not big enough for the number of people who gathered at the site.

The MCLU’s suit resulted in a consent agreement that permitted worship while the city reviewed its regulations. The process ended with the city agreeing to allow “places of assembly” in its Residential-5 zones, but required the center to pay for the removal of a parking lot that had been paved illegally.

In addition, such facilities have to apply for conditional use permits to be sited in R-5 zones.

This process worked as it should have. The city’s legitimate concerns were addressed while the congregation’s constitutional rights were respected. And, unlike in New York or similar controversies elsewhere, no one suggested that Islam should be defined by the actions of extremists.

That’s a real credit to Mainers, because no faith group (or, for that matter, atheism, which is also a belief system) could pass that test.