A conservative Christian law firm that once defended an evangelical baker who refused to bake a cake for a gay couple is now representing a Christian charity that refused to let a homeless transgender woman stay in its overnight shelter.

The Hope Center, which is also known as the Downtown Soup Kitchen, wants to continue barring transgender women from sleeping in its overnight shelter for homeless women, and the Alliance Defending Freedom is supporting it in its fight.

Anchorage, Alaska, where the Hope Center is located, has a city law prohibiting discrimination based on sexual orientation or gender identity. During a court hearing on Friday, ADF lawyers asked U.S. District Judge Sharon Gleason for a preliminary injunction against the city’s government and Equal Right Commission, claiming that enforcing the anti-discrimination law would threaten Hope Center’s religious freedom.

“All Americans should be free to live out their faith and serve their neighbors — including the battered and homeless — without being targeted or harassed by the government,” ADF lawyer David Cortman said in a statement.

In response, city lawyers have asked Gleason to refrain from making a decision about the case until the Equal Rights Commission concludes its investigation of the Hope Center. The charity has reportedly refused to provide information about its public funding, which would help determine whether it is a place of public accommodation that could be required to follow the anti-discrimination law, the city stated in court documents.

Ryan Stuart, an assistant municipal attorney, said Friday that the investigation into the Hope Center is on hold, largely because the shelter has refused to cooperate, The Associated Press reports.

ASSOCIATED PRESS Deitra Ennis, left, and Ryan Stuart, attorneys with the city of Anchorage, talk to reporters after a hearing in federal court Friday. They represent the city in a federal lawsuit filed by a faith-based shelter over a local requirement that it accept transgender women.

The Hope Center is faith-based soup kitchen, occupational training center and homeless women’s shelter. Men and women are able to access the center during the day, but it only allows people who were assigned female at birth to stay overnight. The center houses its overnight guests in one large open room.

Most of the women the shelter accepts overnight have been abused or have been victims of sex trafficking, the ADF said in court filings. The center calls a person’s sex an “immutable God-given gift,” court documents state.

The controversy over the Hope Center’s shelter policies started last January, when a transgender woman, identified in court documents as “Jessie Doe,” was dropped off at the shelter by police officers. Doe had after reportedly being removed from another local shelter for starting a fight.

In its complaint, the ADF maintains that Doe was injured, aggressive and inebriated when she arrived at the center. The ADF says Doe was turned away for violating the center’s policy requiring overnight guests to be sober, not because of her gender identity. The Hope Center reportedly paid for a cab that transported Doe to the hospital for the night.

Doe returned the next day and was turned away again, this time for arriving during a time when the shelter was not accepting new guests, the ADF claims.

Doe later filed a complaint with Anchorage’s Equal Rights Commission, alleging that she had been discriminated against on the basis of her gender identity. The complaint prompted an investigation.

ASSOCIATED PRESS Denise Harle, an attorney with the Christian law firm Alliance Defending Freedom, poses for a photo outside the Hope Center women's shelter in downtown Anchorage, Alaska, on Nov. 1, 2018.

The ADF argues homeless shelters should be exempt from Anchorage’s anti-discrimination law and that the Equal Right Commission’s investigation of the center has been “irrelevant, overreaching, and harassing.”

The ADF has also argued that sleeping alongside a transgender woman would traumatize many of the shelter’s overnight guests.

“Many of the women Downtown Hope Center serves have suffered rape, physical abuse, and domestic violence. They shouldn’t be forced to sleep or disrobe in the same room as a man,” ADF attorney Denise Harle said in a statement. “Battered women need a safe place to stay, but, incredibly, Anchorage is trying to take that place away.”

ADF lawyer Ryan Tucker said Friday that the shelter’s female guests have told staff members “they would rather sleep in the woods” than sleep alongside a trans woman, according to the AP.

But Masen Davis, CEO of the advocacy group Freedom for All Americans, said it’s misleading to suggest that the presence of transgender women creates a risk at women’s homeless shelters.

“Anchorage residents … should not be fooled by misleading tactics by anti-transgender activists that paint transgender women as predators or criminals,” Davis told HuffPost. “Transgender women aren’t men ― they are women who value safety and privacy like everyone else.”

“As always, it’s illegal to enter any space with the intent of harming or harassing someone else, and anyone who does so will be held accountable,” he added.

Homelessness is a major issue for transgender Americans. One in five transgender individuals have experienced homelessness at some point in their lives, according to the National Center for Transgender Equality. Transgender people also face increased risk for violence and victimization. Since 2013, the Human Rights Campaign has documented at least 128 cases where transgender people were victims of fatal violence. Nearly nine in 10 victims were transgender women.

Robin Maril, associate legal director of the Human Rights Campaign, told HuffPost that access to emergency shelter is particularly crucial for the transgender community.

“Flat out denying access to shelter is never the answer, and exclusionary and dangerous policies that discriminate have no business being funded by the taxpayer,” Maril wrote in an email. (IRS filings indicate the Hope Center has received some government grants in the past.)

ADF has stepped in before to defend conservative Christian business owners who want to refuse service to LGBTQ Americans. The organization is perhaps best-known for representing Jack Phillips, a Christian baker who in 2012 refused to make a wedding cake for a gay couple. Last June, the Supreme Court handed Phillips a partial victory by saying the Colorado Civil Rights Commission had shown “hostility” to religion while investigating the claims. The court did not rule on the larger issue of whether people with conservative religious beliefs can seek exemptions from anti-discrimination laws.

Hyoung Chang via Getty Images Jack Phillips, owner of Masterpiece Cakeshop, poses for a photo in his shop in Lakewood, Colorado, on Aug. 15, 2018. The U.S. Supreme Court faulted the Colorado Civil Rights Commission’s handling of the claims brought against Phillips, saying it had showed a hostility to religion.

Most Americans oppose religion-based service refusals, according to statistics from the Public Religion Research Institute. The organization found that a majority of members of only two major religious groups ― white evangelical Protestants and Mormons ― say business owners should be allowed to refuse service to lesbian and gay people. About 53 percent of each group supports service refusals.

Davis said it’s important that Anchorage’s anti-discrimination policies don’t permit “sweeping exemptions” that allow businesses to refuse service to transgender residents.

“Homeless shelters ― many of which are managed by communities of faith ― are a refuge of last resort for those who have nowhere else to go,” Davis said. “It’s especially shameful that anti-LGBT activists are taking discrimination to new levels by attempting to prohibit homeless transgender people from being able to seek safety and shelter.”