A D.C. federal court late Friday granted permission for a large D.C. church to hold outdoor worship services, saying the city’s coronavirus restrictions banning church services of more than 100 people — indoors or out — appear to violate the church’s religious-exercise rights.

Capitol Hill Baptist Church, which has 850 members and no online worship services, has been meeting in a Virginia field. The U.S. District Court’s granting of a preliminary injunction allows the church to meet outdoors en masse in the city, where most of its members live, while its lawsuit moves forward.

The church was not seeking a class action, and the decision, which can be appealed, applies only to Capitol Hill Baptist.

Capitol Hill Baptist, which had twice sought a waiver before suing, centered its argument on comparing D.C. Mayor Muriel E. Bowser’s ban on religious gatherings over 100 with her toleration and encouragement of massive anti-racism protests over the summer. The church’s brief notes that Bowser (D) appeared at a huge anti-racism rally in June, that the city police have been assigned to such events and that her office has not enforced its own ban on outdoor gatherings of more than 50 people.

Similar arguments have been made by a handful of congregations around the country pushing back against various coronavirus restrictions, and rulings have gone both ways. On Friday, a federal judge in Brooklyn denied a request by the national Orthodox Jewish organization Agudath Israel of America to block restrictions on gatherings at synagogues and other houses of worships imposed by Gov. Andrew M. Cuomo (D) in response to a recent increase in coronavirus cases in certain Zip codes. Judge Kiyo A. Matsumoto, a George W. Bush appointee, found that the governor’s action did not violate the free exercise of religion.

The Department of Justice filed a statement of interest in support of the church. Assistant Attorney General Eric Dreiband praised the ruling in a statement: “Last night’s decision is a victory for religious liberty and the rule of law. The Department of Justice is grateful the court ruled preliminarily with this in mind and is grateful that members of Capitol Hill Baptist Church will be able to worship together on Sunday.”

The District had argued that Capitol Hill Baptist has other options, such as breaking into smaller groups for services or meeting online.

“But the District misses the point. It ignores the church’s sincerely held (and undisputed) belief about the theological importance of gathering in person as a full congregation,” wrote Judge Trevor N. McFadden, a Trump appointee. “The District may think that its proposed alternatives are sensible substitutes.” But “it is not for [the District] to say that [the Church’s] religious beliefs” about the need to meet together as one corporal body “are mistaken or insubstantial.”

As it mentioned in its complaint, Capitol Hill Baptist says its theology deems meeting together in person a biblical requirement for “a church.”

The District argued, among other things, that protests were on federal property it does not control, that religious services pose a greater risk than protests, and that there is no evidence of spikes from outdoor protests — unlike multiple outbreaks that have erupted from worship services.

In June, D.C. entered Phase 2, which allows services and activities for up to 100 people or up to 50 percent of the building’s capacity, whichever is fewer. Coronavirus restrictions are more liberal in Virginia and Maryland, though in Maryland, the governor allows localities to be more restrictive, and many are.

Capitol Hill Baptist is one of the biggest congregations in the city and is populated by high-level government officials. It is a theologically conservative church.

“The COVID-19 pandemic has undoubtedly presented unique challenges to governments, which are tasked with balancing the public safety and religious freedom,” the court wrote. However, it said, the church has shown that it is likely to successfully prove the “substantial burden” on its religious exercise. The city has not shown that it is likely to prove a “compelling interest” in limiting the church from meeting outdoors, with masks and social distancing, or that its current rules are the “least restrictive.”

Coronavirus restrictions have proved a hot-button and politically polarizing issue inside U.S. congregations, as in society in general. For some, largely conservatives, they have tapped into a belief that religious liberties are under threat. Conservative groups have for the last decade stepped up their advocacy on the topic as LGBT rights have expanded, clashing at times with their beliefs that the Bible opposes same-sex marriage, among other things, and their ability to get public money.

More broadly, traditional believers have at times seen coronavirus restrictions as a sign that their status and rights are slipping.

“A church is not a church if its members do not all regularly meet together,” Jonathan Leeman, pastor at the nearby Cheverly Baptist Church, wrote this week in a Christianity Today essay called “The D.C. Mayor Doesn’t Get to Define Church.”

“Now, like many evangelicals, you might not agree with CHBC that a church must regularly gather together to be a church,” Leeman wrote. “But all of us have a vested interest in not letting government officials set the definition for what a church is.”

Spencer S. Hsu contributed to this report.