Washington (CNN) The Supreme Court on Wednesday struck down a Tennessee law that requires individuals to live in the state for two years before obtaining a retail license to sell alcohol, a ruling that could give a boost to a large chain of liquor retailers in Tennessee and other states.

The 7-2 ruling is a loss for the Tennessee Wine & Spirit Retailers Association, a trade group of in state retailers, that argued that the law was legal under the 21st Amendment that bolstered a state's authority to regulate alcohol.

But critics, including a national chain, said the law amounted to discrimination against out-of-state residents in violation of principles of the commerce clause.

Justice Samuel Alito, joined by Chief Justice John Roberts, Ruth Bader Ginsburg, Stephen Breyer, Sonia Sotomayor, Elena Kagan and Brett Kavanaugh, said that while the 21st Amendment gives "each state leeway in choosing the alcohol-related public health and safety measures that its citizens find desirable," it is "not a license to impose all manner of protectionist restrictions on commerce in alcoholic beverages."

"Because Tennessee's 2 year residency requirement for retail license applicants blatantly favors the State's residents and has little relationship to public health and safety, it is unconstitutional," Alito wrote.

Read More