WASHINGTON — The Supreme Court agreed on Monday to hear an appeal from a Colorado baker with religious objections to same-sex marriage who had lost a discrimination case for refusing to create a cake to celebrate such a union.

The case will be a major test of a clash between laws that ban businesses open to the public from discriminating based on sexual orientation and claims of religious freedom. Around the nation, businesses like bakeries, florists and photography studios have said, so far with little success, that forcing them to serve gay couples violates their constitutional rights.

Read more in The New York Times.