Figurines are depicted in an embrace as part of the wedding cake display at Masterpiece Cakeshop in Denver, Thursday, June 6, 2013.

 (AP Photo/Brennan Linsley)

Updated 3:50 p.m. -- A Colorado clash between gay rights and religion started as an angry Facebook posting about a wedding cake but now has big implications for anti-discrimination laws in 22 states.

Baker Jack Phillips is challenging a Colorado law that says he was wrong to have turned away a same-sex couple who wanted a cake to celebrate their 2012 wedding.

The justices said Monday they will consider Phillips' case, which could affect all states. Twenty-two states include sexual orientation in anti-discrimination laws that bar discrimination in public accommodations.

Masterpiece Cakeshop owner Jack Phillips decorates a cake inside his Lakewood, Colo., store on March 10, 2014.

(AP Photo/Brennan Linsley)

Phillips argues that he turned away Charlie Craig and David Mullins not because they are gay, but because their wedding violated Phillips' religious belief.

Bur Denver attorney Christopher Jackson, who has worked in the Attorney’s General’s office and tracks important Colorado cases, said the plaintiffs argued that the act of baking a wedding cake is just a traditional consumer transaction.

After the couple was turned away in 2012, they complained about Masterpiece Cakeshop on Facebook, then filed a complaint with the Colorado Civil Rights Commission. The state sided with the couple.

"It solidified the right of our community to have a right to public accommodations, so future couples are not turned away from a business because of who they are," Mullins said Monday.

Phillips says that artisans cannot be compelled to produce works celebrating an event that violates the artist's religion. A lawyer for Phillips pointed out that another Denver-area baker was not fined for declining to bake a cake with an anti-gay message.

"The government in Colorado is picking and choosing which messages they'll support and which artistic messages they'll protect," said Kristen Waggoner of the Alliance Defending Freedom, which took the baker's case.

The decision to take on the case reflects renewed energy among the high court's conservative justices, whose ranks have recently been bolstered by the addition of Justice Neil Gorsuch.

The Colorado case could settle challenges from at least a half-dozen other artists in the wedding industry who are challenging laws in other states requiring them to produce work for same-sex ceremonies.

Those cases include a Washington state florist who has been fighting a lawsuit filed after she refused to provide services for a gay wedding in 2013.

And earlier this month, owners of a Phoenix calligraphy studio filed suit against a city anti-discrimination ordinance that could lead to jail time if the Brush & Nib Studio denied service for a same-sex union.