DENVER, Colorado — A Colorado baker’s insistence that his religious beliefs justified his refusal to make a wedding cake for a gay couple created trouble for the state’s civil rights commission long before the U.S. Supreme Court ruled it had made a mistake.

The high court on Monday found that the Colorado Civil Rights Commission failed to adequately consider Jack Phillips’s religious beliefs when it ruled against him for refusing to make the cake at his Masterpiece Cakeshop.

Without explicitly citing the case, Republicans who control the state Senate tried to add more pro-business seats on the commission — one of the first such panels in the nation — when it came up for reauthorization during the 2018 legislative session.

In the end, lawmakers changed the composition of the seven-member commission to add a business representative and, among other things, ensure no political party has an advantage on the panel.

RELATED: Supreme Court rules in favor of baker who declined to serve gay wedding

The agreement also confirmed Senate authority to reject gubernatorial appointments to the commission, whose mandate was extended until 2027.

“For me, the Masterpiece case was a symptom of the problem of imbalance in the commission,” said Bob Gardner, a Colorado Springs Republican senator who negotiated a renewal. “We avoided steadfastly injecting this case into the debate simply because it was such a lightning rod.”

Senate President Kevin Grantham said the Supreme Court decision opens the door to follow-up reforms.

But Gardner noted that November’s elections — which could keep the governor’s office in Democratic hands and give Democrats both chambers of the Legislature — also will play a major role in its fate.

“We have an election, and the governor we elect this November will make the next three appointments,” Gardner said.

Democratic U.S. Rep. Jared Polis hopes to become the first openly gay governor in Colorado. He has three competitors in a June 26 primary to choose a GOP candidate in the race to replace Democratic Gov. John Hickenlooper, who is term-limited.

“We can and must provide LGBTQ people with abundantly clear protections from discrimination in law,” Polis said after the Supreme Court ruling.

In their 7-2 ruling, the justices found that Colorado’s commission violated Phillips’s First Amendment rights when it ruled in favor of Charlie Craig and Dave Mullins. The court said some commission members used speech exhibiting anti-religion bias in their deliberations.

Justice Anthony Kennedy, who wrote the majority opinion, said anti-discrimination laws “must be applied in a manner that is neutral toward religion.”

But the court stayed out of the thornier issue of whether people can avoid providing services to same-sex weddings because of religious beliefs.

The decision frustrated both sides in the debate.

“The court didn’t change the legal landscape at all. It said that you must take religious claims seriously, which you should have been doing before,” said Lisa Sorenon, executive director of the Washington, D.C.-based State and Local Legal Center.

The center had filed an amicus brief supporting Colorado.

Democratic Rep. Leslie Herod, the first African American LGBTQ person elected to public office in Colorado, said she assumes lawmakers who traditionally bring forward anti-LGBTQ legislation will do so again, using the Supreme Court ruling.

Hickenlooper said the Supreme Court ruling is being taken seriously.

“We have no doubt that the Colorado Civil Rights Commission will meet that standard as they listen, respectfully, to all sides of the matters that come before it,” he said.