SALT LAKE CITY -- Nearly all of the Utah State Senate has signed on in support of a Colorado shop who refused to bake a wedding cake for a same-sex couple in a case now pending before the U.S. Supreme Court.

The Church of Jesus Christ of Latter-day Saints and Sen. Mike Lee, R-Utah, also signed on in support of Masterpiece Cake Shop in a series of amicus filings.

For 22 of the 24 members of the Utah State Senate's Republican majority caucus, they insist they are not anti-gay, and spent part of their filing defending their record on LGBTQ rights.

"Amici are Utah Republican State Senators who support compromise between LGBT protections and religious liberties. In 2015, against then prevailing political currents, supermajorities in Utah’s GOP controlled legislature added sexual orientation and gender identity to state antidiscrimination laws after stakeholders carefully balanced LGBT safeguards with religious liberties," the filing states. "This 'Utah Compromise' brought together LGBT organizations and faith groups with the mutual goal of achieving fairness for all in state employment and housing laws."

Scroll down to read the filing by the Utah Republican senators

The LDS Church pointed out its role in passing non-discrimination laws in the Utah State Legislature. However, the Mormon church (joined by the Lutheran Church-Missouri Synod, the National Association of Evangelicals, and the Union of Orthodox Jewish Congregations of America, among others) asks the U.S. Supreme Court to take into account the First Amendment rights of deeply-religious people.

"Amici are religious organizations who accept that 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," the filing begins.

Scroll down to read the LDS Church's court filing

With the LDS Church's support, the Utah State Legislature passed Senate Bill 296, a landmark law that prohibits discrimination housing and employment in the state. It also carved out exemptions for government employees who objected to performing a same-sex marriage and also has safeguards for transgender people using restrooms.

The bill came in 2015 after Utah lost efforts in the courts to defend its constitutional amendment prohibiting same-sex marriage, but before the U.S. Supreme Court ruled in favor of marriage equality.

In Masterpiece Cakeshop v. Colorado Civil Rights Commission, owner Jack Phillips refused to bake a wedding cake for David Mullins and Charlie Craig, citing his religious beliefs against same-sex marriage. Colorado has a law prohibiting discrimination in public accommodations, which includes things like race, gender, or sexual orientation. The state ruled against the cake shop under Colorado's public accommodations law, and the case is now pending before the U.S. Supreme Court.

Utah law currently has no public accommodations protections that cover sexual orientation, but it does cover race, gender and religion. Salt Lake City Councilman Stan Penfold told FOX 13 he was working on an ordinance covering sexual orientation in public accommodations.

That ordinance is still being drafted.

"There is not a bride who has reached the altar in Utah who hasn’t been helped by a fabulous gay along the way," joked Troy Williams, the executive director of the LGBTQ rights group Equality Utah.

Williams said he believed religious freedom should not allow someone to pick and choose who they discriminate against.

"If the LDS Church and the Utah legislature don’t want the courts to decide something like public accommodations, that’s awesome," he told FOX 13. "Let’s get together this January at the Utah legislature and let’s start working together to pass a law that protects everybody."

Senate Majority Whip Stuart Adams, R-Layton, who sponsored SB296, insisted the amicus was encouraging the U.S. Supreme Court to find balance like Utah did previously.

"In my opinion, the business simply says they would give service to everyone. But because of their deep-seeded religious beliefs they have a challenge trying to actually balance those two," he told FOX 13. "We need to find a way for the business to give that service but allow the individual to be able to step off and follow their conscience."

Read the amicus by the Utah State Senate Majority Caucus here:

Read the amicus by the LDS Church and other religious groups here: