NATIONWIDE -- The Supreme Court has ruled in favor of a Colorado baker who refused to make a wedding cake for a same-sex couple.

The justices voted 7-2 on Monday that the Colorado Civil Rights Commission violated baker Jack Phillips' First Amendment rights in a case that had been closely watched both by religious and LGBT advocates.

The justices did not, however, decide on a bigger issue in the case: whether a business can refuse to serve LGBT people.

Justice Anthony Kennedy wrote in his majority opinion that the issue "must wait further elaboration." Kennedy's vote had been closely watched, because although he wrote the Supreme Court's ruling that paved the way for same-sex marriage several years ago, he also favors free-speech rights.

“Masterpiece Cakeshop is an odd decision in part because it’s written by Anthony Kennedy. Kennedy at least for the last 15 years has been a pretty strong proponent of same sex couples to get married,” said Robinson Woodward-Burns, a political science professor at Howard University.

Justice Kennedy also drafted the majority opinion in Obergefell, which granted same sex couples the right to marry nationwide.

Information from the Associated Press and CNN was used in this report.