Mormon leaders are trying to stake out a middle ground in the escalating battle between gay rights and religious freedom, demanding that both ideas, together, be treated as a national priority.

At a rare news conference at church headquarters in Salt Lake City Tuesday, leaders of The Church of Jesus Christ of Latter-day Saints forcefully condemned discrimination against gays and vowed to support nondiscrimination laws — like one proposed in Utah — to protect people from being denied jobs or housing because of their sexual orientation.

But they also called for these same laws, or others, to protect the rights of people who say their beliefs compel them to oppose homosexuality or to refuse service to gay couples. They cited examples of religious opponents of same-sex marriage who have been sanctioned, sued, or have lost their jobs.

“Such tactics are every bit as wrong as denying access to employment, housing, or public services because of race or gender,” said Elder Dallin H. Oaks, a member of a group of church leaders known as the Quorum of the Twelve Apostles. “It is one of today’s great ironies that some people who have fought so hard for LGBT rights now try to deny the rights of others to disagree with their public policy proposals.”

The church’s announcement, an attempt to placate all sides of a divisive issue, astonished some lawmakers in the halls of Utah’s Capitol, who called it a watershed moment that could reconfigure the debate over gay rights in their socially conservative state. With the church now backing nondiscrimination laws, a bill offering such protections to those who are lesbian, gay, bisexual, and transgender now appears more likely to pass after years of being stalled in the Legislature.

The church had already supported such legislation in Salt Lake City and other local Utah jurisdictions, but had held off endorsing it statewide.

“This was a major event for the Mormon church, a major event for Utah and the LGBT community,” said state Sen. Stephen H. Urquhart, a Republican who has tried unsuccessfully to pass an anti-discrimination law. “This changes the dynamic.”

The Mormon leaders at the news conference, three of the church’s male apostles and one woman, made it clear that their church does not intend to change its doctrine, which says marriage can be only between a man and a woman, and gay sexual relationships are prohibited.

This doctrine “comes from sacred Scripture, and we are not at liberty to change it,” said Sister Neill Marriott, a leader in a church women’s organizations.

The church is now trying to position itself as a champion of both gay rights and the conservative religious opposition to gay rights.

But the approach announced by Mormon leaders is unlikely to do much to help calm this front in the culture wars. Gay rights advocates have long maintained that denying service to gays on the basis of religious belief is no different from the discrimination against blacks that was outlawed during the civil rights movement.

The Human Rights Campaign, a leading gay rights organization, said that the Mormon leaders’ endorsement of nondiscrimination laws may be “deeply meaningful” to gay Mormons and their families, but is “deeply flawed” as a matter of public policy.

“Doctors would still be allowed to deny medical care. Pharmacists would still be allowed to refuse to fill valid prescriptions. And landlords, as well as business operators, would still be allowed to reject LGBT people. All in the name of religion,” according to a statement from the Human Rights Campaign.

Russell Moore, president of the Southern Baptist Convention’s ethics and religious liberty commission, called the move “well-intentioned but naive.”

Proposals to address discrimination against gay people in employment or housing “inevitably lead to targeted assaults on religious liberty,” he said.

Mormon leaders have in recent years joined Roman Catholic bishops, Southern Baptist pastors and other conservative evangelicals in what they have framed as a “religious liberty” campaign to defend their freedom of conscience.

The announcement again shows how the Mormon church has been trying to change its tone on homosexuality since 2008, when it faced widespread condemnation for mobilizing members and raising money to help pass Proposition 8 in California, which outlawed same-sex marriage.

In 2009, the church threw its support behind a local law in Salt Lake City protecting gay and transgender people from job and housing discrimination. But it remained largely silent on efforts to pass statewide anti-discrimination laws.

With the Utah Legislature back in session, Urquhart is again trying pass a law that would ban housing and employment discrimination based on someone’s sexual orientation or gender identity.

“I think the bill, now, will pass,” he said.

But conservative lawmakers were still skeptical.

Rep. Jacob Anderegg, R-Lehi, said the church’s change in position cleared some “potential stumbling blocks,” but he said he still had fundamental concerns.

“I can’t say definitively right now that I’m on board,” he said. “The devil’s in the details.”