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

At a rare news conference at church headquarters in Salt Lake City, 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 or 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 L.G.B.T. rights now try to deny the rights of others to disagree with their public policy proposals.”