Updated at 5:46 p.m. | Posted at 10:30 a.m.

If all goes as planned, Twin Cities Muslim leaders will soon be able to hold prayer services in the basement of a suburban office center.

That's no small thing. A settlement agreement announced Tuesday ends a federal lawsuit alleging the St. Anthony Village City Council violated federal law when it rejected a proposal for an Islamic center two years ago.

To mark the end of the lawsuit, city leaders, representatives of the U.S. Attorney's office and the Somali-American community gathered in front of the imposing midcentury office building that was the center of the two-year-old dispute. Dozens of Somali-American leaders, including local imams, stood shivering, but united, with the mayor of St. Anthony — their former adversary.

One of the imams, Sheikh Abdirahman Omar, offered an olive branch to residents of this small suburb who opposed the mosque proposal.

"We understand that you may have some fear of Somali people, and Muslims," Omar said. "But I want to tell you, we came here 20 years ago seeking freedom, and safety. The same reasons your forefathers came here: safety and freedom, including religion."

That was Omar's way of reaching out to residents, even those who spewed hateful comments at a public meeting in 2012, when the City Council denied a conditional use permit for the Abu-Huraira Islamic Center in part of the former Medtronic headquarters.

In making the decision, which went against a recommendation from the planning commission, city leaders said the decision wasn't discriminatory. Instead, they said the plans for the mosque at the St. Anthony Business Center were not compatible with the area's light-industrial zoning.

On Tuesday, Mayor Jerry Faust, who voted against the center proposal, offered conciliatory words. Although the agreement still needs approval by the City Council, he said it felt good to reach a compromise.

"I couldn't find a better time of the year to do that, than this time — not because it's cold," Faust said. "But because it's the time of peace and goodwill. And we need to do the right thing."

In 2012, the Council on American-Islamic Relations asked the U.S. Department of Justice to investigate whether the city violated the Religious Land Use and Institutionalized Persons Act. In August of this year, U.S. Attorney Andrew Luger sued the city, alleging that the City Council was unlawfully biased against a religious use because the light-industrial district where the site is located allowed secular groups to assemble.

The settlement reverses "an injustice," Luger said.

"Today marks a new beginning for the Somali community and the people of St. Anthony," he said. "It's a proud day for all Minnesotans."

Hassan Mohamud, the imam of a mosque in St. Paul, said the resolution gives him hope that the U.S. Attorney's Office will investigate other perceived forms of injustice toward Muslims.

Mohamud said he's one of many Somali-Americans who continue to face extra security screening while traveling at the airport. He called the announcement about the mosque a positive first step.

"It's the beginning of a long journey that Somalis in particular, but all Muslims, will feel — that we're part of the American fabric," Mohamud said.

The St. Anthony case is one of six in the state involving proposals for Muslim institutions — five mosques and one school — that have faced community opposition in recent years, said Lori Saroya, executive director of the Council on American-Islamic Relations. Proposals in Blaine, Plymouth, Willmar and Bloomington eventually were approved. In St. Cloud, the mosque withdrew its application.

But until last week, some weren't convinced that the City of St. Anthony and the mosque could settle their differences. Nikki Carlson, a lobbyist for the Islamic center, said she thought a trial was all but inevitable.

A marathon hearing Thursday before Magistrate Judge Jeffrey Keyes lasted about 12 hours. Carlson remembers that while waiting to hear developments, the imams prayed four times as part of their religious duty.

"It was so funny because they would pray, and the judge would come back and bring us good news, and they'd pray, and the judge would come back and bring us good news," she said.

Faust said there was never a turning point that convinced him to settle. But the mayor said he was aware that if the case went to trial, the city could have lost.

"Sometimes," he said, "you just need to take a look at it and say, what is best for the community, how do we move forward, how do we commence the healing, and how do we make it better for all parties involved to the best of our ability?"

Another imam, Sheikh Ahmed Burale, thanked Faust for working with the community.

"And also we also want to forgive one another," Burale said through a Somali translator. "No hard feelings."

"No hard feelings," Faust replied. "We're all brothers."

With that, the mayor shook the imam's hand and said, "You will be accepted by this community."