When a small South Carolina town decided against renting its civic center to a Baptist church, town officials did not expect a confrontation with the Trump administration.

Edisto Beach, a vacation community with a year-round population of 600, leased its civic center twice last year to Redeemer Fellowship. But town officials worried that continuing the arrangement might signal that the local government endorsed a religion, a violation of the constitutional separation of church and state, according to town meeting minutes.

The congregation of Redeemer Fellowship saw the situation differently. In August, it sued in federal court, alleging religious discrimination. Three months later, the U.S. Justice Department stepped in, siding with the church and asking a judge to rule against Edisto Beach. A lawyer for the town, Drew Butler, was surprised, but perhaps he should have expected it.

A NBC News and Columbia Journalism Investigations review of dozens of court cases found that in its first two years the Trump administration's Justice Department submitted more friend-of-the-court briefs in religious liberties cases than the Obama administration and the Bush administration during their first two years. It has also filed briefs at lower, trial court levels faster than both of the two previous administrations.

The filings are in keeping with the Trump administration's forthright position on religious liberty. "A dangerous movement, undetected by many, is now challenging and eroding our great tradition of religious freedom," then-Attorney General Jeff Sessions said at the Department of Justice's Religious Liberty Summit last July. "This president and this Department of Justice are determined to protect and even advance this magnificent heritage."

Attorney General Jeff Sessions speaks at the Religious Liberty Summit at the Department of Justice on July 30, 2018. Manuel Balce Ceneta / AP file

The filings, known as amicus curiae briefs or statements of interest, are made by a person or organization that is neither a plaintiff nor a defendant, but someone weighing in to argue the legal issues of a case. The Justice Department voices its views when it believes there is an important federal government interest in a case, and has the legal authority to do so in any court in the nation.

One of the Trump administration's most notable friend-of-the-court briefs on religious freedom was in support of Masterpiece Cakeshop, the Colorado bakery which argued before the U.S. Supreme Court last year that, on religious grounds, it can refuse to bake customized wedding cakes for gay customers. The case was an appeal of a Colorado Civil Rights Commission ruling that found the bakery had discriminated against a gay couple. As the case headed to the nation's top court, the Trump administration's lawyers outlined to the justices why they should rule for the confectionery maker's freedom of speech claim. It was one of many such briefs the Department of Justice has recently filed.

In its first two years, the Trump administration filed 12 amicus briefs and statements of interest in religious liberties cases — a pace of one filing every two months. In their first two years, both the Bush and Obama administrations filed fewer such briefs, two for Bush and eight for Obama. Over its full eight-year span, the Obama administration filed a total of 23, a pace of one every four months. The George W. Bush administration filed 34 briefs over eight years, a pace of one every three months.

All but one of the 23 briefs filed during the Obama administration were about the Religious Land Use and Institutionalized Persons Act (RLUIPA), a law passed during the Clinton administration to stop communities from discriminating by using land-use codes to block the construction of houses of worship. The Bush administration filed briefs on a wider range of religious liberty laws, as has the Trump administration.

In addition, the Trump administration has made greater use of lower courts, meaning state courts and federal district courts, to file briefs. The Bush and Obama administrations each filed six amicus briefs in lower courts during their eight years, far less than half of their friend-of-the-court briefs on religious liberties. The Trump administration has already surpassed its predecessors, with seven amicus briefs submitted to lower courts in two years, more than half of all its friend-of-the-court filings.

Amicus briefs are unusual in lower courts, legal experts say, particularly when they're filed by the federal government.

David Mullins and Charlie Craig outside the U.S. Supreme Court on Dec. 5, 2017 in Washington. Craig and Mullins filed a complaint with the commission in 2012 after conservative Christian baker Jack Phillips refused to sell them a wedding cake for their same-sex ceremony. Chip Somodevilla / Getty Images

"You're letting the district court know that the U.S. is on your side," said Ira Lupu, an emeritus law professor at George Washington University who specializes in constitutional law and religion. "It might make a district court judge take some arguments more seriously than she would have."

"If you think [the case] might be a promising vehicle for Supreme Court review in a year [or two], perhaps you can shape the argument at the district level," Lupu said.

There are few rules that limit when the nation's top lawyers may file an amicus brief, leaving each administration wide latitude for deciding when to intervene, according to a 2017 Harvard Civil Rights-Civil Liberties Law Review study examining the agency's amicus filings and statements of interest in lower courts over the past 125 years on civil rights cases.

"Among the most powerful — and least examined — tools in civil rights litigation is the statement of interest," wrote Victor Zapana, now a federal appellate court law clerk, who authored the study while a Harvard Law student.

The study found these filings have become an increasingly common tool of the Justice Department over the past decade.

A spokesperson for the Justice Department, asked about the agency's legal strategy on religious liberties cases, referred NBC News to several earlier statements from Sessions.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Under the laws of this country, government cannot discriminate against people based on their religion — not in law enforcement, not in grant-making, not in hiring, and not in local zoning laws," Sessions said in an announcement of a religious liberty initiative last June. "President Trump is an unwavering defender of the right of free exercise, and under his leadership, the Department of Justice is standing up for the rights of all Americans."

A place for worship

While the Trump administration has sought to limit immigration and travel from Islamic countries, two of its amicus briefs are on behalf of building mosques.

In the Detroit suburb of Sterling Heights, a group of residents, including some Iraqi Christians, filed a federal suit against the city for allowing construction of a mosque. They said they had been subjected to violence by ISIS and did not want the American Islamic Community Center in their neighborhood.

In Vineland, N.J., the Garden State Islamic Center wanted to expand, but officials said the facility would be too big to meet sewage requirements.

"The president personally has been publicly hostile to Muslims," said Douglas Laycock, a professor of religious liberties law at the University of Texas and University of Virginia. "The encouraging news here is the Justice Department and its career people working in an apolitical way and filing briefs in other kinds of cases as well."

A man walks past Iraqi storefronts in Sterling Heights, Michigan, on March 26, 2017. Salwan Georges / The Washington Post via Getty Images file

The legal issues in the mosque cases revolve around RLUIPA, the law that limits local zoning restrictions on buildings of worship. Legal precedents under this law can potentially benefit any house of worship, not just mosques.

Along with supporting the mosques, the Trump administration filed other briefs favoring building houses of worship. One backed a Hindu temple near Baltimore. Two others supported converting homes into churches, including a Roman Catholic congregation in suburban Kansas City, Kan., another was in Baltimore for a nondenominational Christian church.

Apart from those land use cases, the Trump administration's religious liberties amicus filings and statements of interest all sided with Christians.

Along with the Masterpiece Cakeshop case, it objected when the Washington, D.C., public mass transit agency rejected Christmas ads on its buses from the local Roman Catholic archdiocese.

It supported Christian students upset that Montana tax credits for private elementary and high school students excluded those who attended religious-affiliated schools.

Last year, the Supreme Court ruled 5-4 in favor of Christian "crisis pregnancy" centers in California that objected to state regulations for abortion access. The Trump administration weighed in on behalf of the Christian pregnancy centers that did not want to promote abortion services.

It supported a Christian student stopped from evangelizing at Georgia Gwinnett College. The public university contended he could preach only if he got a permit and used one of the college's "free speech zones." The school later abandoned the restriction.

More recently, under then-acting Attorney General Matthew Whitaker, the Justice Department backed a Christian student group after the University of Iowa disciplined it for allegedly discriminating against a gay student.

The Trump administration has not supported every notable claim of religious liberties. Recently it prosecuted Scott Warren, an activist who supplied water and food for undocumented immigrants crossing the border in the Southwest. The activist cited his religious beliefs under the Religious Freedom and Restoration Act (RFRA) as a defense. The Justice Department discounted the claim.

"It is important to note that the government did not ignore the defendant's RFRA claims," said a DOJ official in a statement to NBC News. "The government's position was that, given Warren's specific alleged conduct, the prosecution did not represent a substantial burden under RFRA."

Others saw the government's position as a narrow application of religious liberties law.

"The government's commitment to religious liberty is a bit duplicitous," said Katherine Franke, a law professor at Columbia University who filed an amicus brief with four other law professors backing Warren's claim.

"If your religious claim is in alignment with the government's political objectives, … they will show up for you aggressively," she said. "If your overall political work is opposing the government's immigration policy, for instance … then the government is not going to be supportive of your religious liberty claims."

The Trump administration also was not swayed by the Cheyenne River Sioux's argument in a suit against the government that its religious rights would be violated by the Dakota Access oil pipeline because it infringed on sacred land.

The administration's legal efforts have drawn praise from Christians. The Alliance Defending Freedom, a conservative Christian legal group co-founded by prominent evangelical James Dobson, a strong supporter of President Trump, applauded the shift by the administration's lawyers on religious liberties.

President George W. Bush bows his head in prayer along with Dr. James Dobson, left, during the National Day of Prayer ceremony at the White House in 2007. Chip Somodevilla / Getty Images file

"Freedom of speech and religion aren't subject to political and cultural whims," Bob Trent, a spokesperson for ADF, wrote in an email statement to NBC News. "We are grateful that this administration recognizes that reality and is taking serious steps to correct injustice and protect the freedom of religion."

ADF's lawyers have been lead counsel in several recent high-profile religious freedom cases, representing the Colorado bakery and supporting employers who object on religious grounds over having to pay for insurance covering contraceptives under Obamacare.

In court, ADF and the Trump administration have also found agreement. The Trump administration's Justice Department has filed four briefs in cases where ADF are lead counsel. That includes the Edisto Beach case, where ADF is representing the church. In the past, the Bush administration filed amicus briefs supporting five ADF-led cases, and the Obama administration filed one supporting ADF's position.

"The DOJ sets its own agenda," said Jeremy Tedesco, ADF's senior counsel and vice president of U.S. advocacy, said in a statement. "We are grateful that the current administration has made it a priority to protect the religious liberty of all Americans. ... The Constitution prevents the government from treating religious organizations worse than others simply because they are religious. It is right and important that the DOJ takes action in these cases."

The lay of the land

President Trump came into office promising to defend religious protections. Within his first few months, he signed an executive order that directed Sessions to issue new guidelines on religious liberties for federal agencies. Sessions followed up with a list of 20 ways agencies should incorporate religious liberties into rule-making. He also assembled a Justice Department task force to examine religious discrimination.

In July 2017, Sessions gave a speech at a religious liberties event in California held by ADF.

Session's appearance at the event in 2017 prompted the Justice Department's LGBTQ employee association to write a public letter expressing their concern to the then-attorney general.

"Such a visit dignifies a group that does not recognize the dignity of some of your own employees," wrote the employees, referring to ADF's public advocacy against gay marriage.

Back in South Carolina, in an effort to avoid lengthy litigation, the Edisto Beach council in December rescinded its prohibition on religious worship services at the civic center. The church and its ADF attorneys condemned the change, calling it a strategy to evade an adverse legal decision. In its brief, the Justice Department stated it wants the judge to issue a decision, and believes the church will prevail. The litigation is ongoing.

David Mora, Maya Miller and Andrew R. Calderon are part of Columbia Journalism Investigations, a team of reporters, faculty and postgraduate fellows who examine issues of public interest. Funding is provided by the Columbia Journalism School.