Washington - The US Supreme Court on Monday ruled in favour of a Colorado baker who refused to design a wedding cake for a same-sex couple, in a closely-watched case pitting gay rights against religious liberty.In a 7-2 decision, the high court ruled that while the Colorado Civil Rights Commission determined that Masterpiece Cakeshop must serve clients regardless of sexual orientation, the panel showed "clear and impermissible hostility toward the sincere religious beliefs" of the baker. The commission therefore violated the baker Jack Phillips' religious rights under the US Constitution's First Amendment, the justices found. But they did not definitively rule on the issue of whether a business can decline to serve gays and lesbians based on religious views, meaning the broader contentious issue is likely to simmer.The US Supreme Court legalised same-sex marriage nationwide in 2015, and the state of Colorado has a series of anti-discrimination laws that protect gay people.Phillips had argued that he refused to serve the couple, David Mullins and Charlie Craig, in 2012 because their planned marriage ran counter to his Christian faith.'Await further elaboration'The Colorado commission's "hostility was inconsistent with the First Amendment's guarantee that our laws be applied in a manner that is neutral toward religion", Justice Anthony Kennedy wrote in an 18-page majority opinion."The outcome of cases like this in other circumstances must await further elaboration in the courts, all in the context of recognising that these disputes must be resolved with tolerance, without undue disrespect to sincere religious beliefs, and without subjecting gay persons to indignities when they seek goods and services in an open market."Last December the high court heard impassioned arguments in the closely watched case pitting free speech, religion and artistic freedom against anti-discrimination laws.It has been the most significant case for gay rights since the high court approved same-sex marriage.The American Civil Liberties Union, which argued the case on behalf of Mullins and Craig, said Monday's ruling represented a victory for the core principle upholding fair business practices for all."The court reversed the Masterpiece Cakeshop decision based on concerns unique to the case, but reaffirmed its longstanding rule that states can prevent the harms of discrimination in the marketplace, including against LGBT people," said ACLU deputy legal director Louise Melling.