SALT LAKE CITY — The LDS Church and 22 Republican state senators have jumped into the legal battle over a Colorado baker refusing to create a wedding cake for a same-sex couple.

They put their names on amicus or friend-of-the court briefs supporting Masterpiece Cakeshop owner Jack Phillips in his case against the Colorado Civil Rights Commission pending before the U.S. Supreme Court.

The Church of Jesus Christ of Latter-day Saints and seven other religious organizations say in the brief that they accept same-sex civil marriage is the law of the land.

"But some deeply religious Americans, including some of amici’s members, cannot in good conscience assist with same-sex weddings. Now that the court has protected the liberty of same-sex couples, it is equally important to protect the religious liberty of these conscientious objectors," according to the brief.

Douglas Laycock, a University of Virginia law professor, gay rights advocate and religious freedom expert, is the lead author on the brief.

In an appendix to the brief, the LDS Church notes its "fairness to all" approach to resolving standoffs between religious freedom and LGBT rights.

"Believing in basic fairness for all, the church has openly encouraged and participated in legislative efforts to secure essential rights for LGBT citizens while protecting religious freedom," the brief says.

Phillips refused to create a cake for the wedding reception of a gay couple who were planning to marry in Massachusetts. The couple, Charlie Craig and David Mullins, pursued discrimination charges and won before a civil rights commission and in the courts. Phillips appealed, and the Supreme Court agreed in June to hear the case.

Members of the Utah Senate in their own brief say they favor compromise between LGBT protections and religious liberties. They cited a 2015 bill that passed the GOP-controlled Utah Legislature adding gender identity and sexual orientation to the state's anti-discrimination law in housing and employment balanced with religious freedom protections.

State lawmakers, gay rights advocates and the LDS Church came together on the legislation after years of tension stemming from Proposition 8 in California and Amendment 3, the Utah law defining marriage as between a man and a woman that courts ruled unconstitutional.

Senate Majority Whip Stuart Adams, R-Utah, said the senators want to encourage the Supreme Court to keep the same spirit of balance in the Masterpiece Cakeshop case that was achieved in Utah.

"The premise behind that is to be able to add additional protections to try to ensure that everyone receives the rights of freedom of speech and expression that they deserve," he said.

Troy Williams, executive director of Equality Utah, agrees that religious freedom is one of Utah’s core values.

"It’s so important that we have protected it in the U.S. Constitution. However, we do not believe that religious freedom gives business owners the right to pick and choose who they want to discriminate against," he said.

Williams said he can't imagine Utah vendors hanging signs that say, “No Gays Served Here.”

"Such an outcome would only reignite and exacerbate the culture war, further dividing an already fractured nation," he said.

Adams said the none of the senators would sign onto a brief that would allow that to happen because it would be discriminatory and illegal. The goal, he said, is to find tolerance and respect on both sides.

Laycock argues for the religious organizations that couples who buy their cake from another baker still get to live by their own values. They will celebrate their wedding, love each other, be married, and have their occupations. But Phillips does not get to live his own values if he must repeatedly violate his conscience making wedding cakes for every same-sex couple who asks.

"Forcing (Phillips) to choose between his business and his conscience is an historic means of religious persecution," according to the brief.

In the appendix, LDS Church affirms that its doctrine holds that “marriage between a man and a woman is ordained of God." It also acknowledges that civil law allows same-sex marriage but that it does not change church doctrine, teachings, practices or policies regarding marriage.

Besides the LDS Church, the other religious organizations that signed on to the brief are the Christian Legal Society, the Center for Public Justice, the Lutheran Church–Missouri Synod, National Association of Evangelicals, Queens Federation of Churches, Rabbinical Council of America and Union of Orthodox Jewish Congregations of America.

Sen. Mike Lee, R-Utah, also signed on to a friend-of-the-court brief last week backing Phillips, saying it is not a public accommodations case. He called it a "compelled speech" case because the couple asked Phillips to use his talents to make a specialty cake to carry a message with which he disagrees.

"This isn’t a case in which someone refused to sell a pre-made good to someone else based on their sexuality or orientation," the senator said. "The government cannot force you to speak where you choose to remain silent. It cannot make you make a statement with which you firmly, fundamentally disagree."