This story has been updated.

The District has agreed to pay $220,000 in legal fees to a Capitol Hill church that had sued over coronavirus meeting restrictions, one of a slew of successful legal challenges by religious groups during the pandemic.

The settlement signed Thursday applies only to Capitol Hill Baptist Church, an 850-member congregation whose theology deems meeting together in person a biblical requirement for a church.

The city this spring lifted all capacity and other restrictions, but the settlement addressed a case that began in September. Capitol Hill Baptist had sued, alleging the city was violating the First Amendment at the time by facilitating and tolerating massive anti-racism protests while strictly limiting the size of worship services — indoor or outdoor — because of the pandemic.

A D.C. federal court ruled in the congregation’s favor in October, granting a preliminary injunction for it to meet outside. The church at the time was worshiping in a field in Virginia.

This week’s settlement says it is not an admission of liability or any wrongdoing, but in it the city says it “will not enforce any current or future covid-19 restrictions to prohibit CHBC from gathering as one congregation” in D.C.

Attorney General Karl A. Racine’s office declined to comment late Friday.

Capitol Hill Baptist was the first religious legal challenge to the city’s pandemic restrictions. The Catholic Archdiocese in December sued Mayor Muriel E. Bowser (D) over attendance limits during a week when the District saw the largest number of coronavirus infections since the start of the pandemic. Bowser several days later eased attendance caps.

This week’s settlement follows victories in the U.S. Supreme Court for religious organizations arguing for exemptions under the First Amendment.

In the fall, the high court barred coronavirus restrictions on religious services in New York, saying that they violated the free exercise of religion and that secular facilities like grocery stores and restaurants were being given more freedom than congregations.

Last month, the high court unanimously that the city of Philadelphia was wrong to end a Catholic group’s contract to provide foster-care services because the organization refused to work with same-sex couples. The city has an anti-discrimination policy, which theoretically allows some exceptions; the court said Catholic Social Services’s free exercise of religion was violated because Philadelphia didn’t extend them one.

The District’s settlement with Capitol Hill Baptist grants $210,000 to the firm WilmerHale and $10,000 to First Liberty Institute.

Hiram Sasser, First Liberty’s executive general counsel, said the payment of legal fees was standard after the court ruled in the church’s favor last fall. Still, he said the settlement is significant.

“It shows the first amendment is alive and well, and I don’t think you’ll see the government shutting down congregations without really good reasons,” he said Friday.

Julie Zauzmer contributed to this report.