A state law that legalized daily fantasy sports in New York two years ago was struck down in a decision by Albany County Supreme Court Justice Gerald Connolly on Monday.

Connolly said in the decision that daily fantasy sports, an online game where users create fake teams out of various sports players and either earn or lose money based on their performance, is akin to gambling, and therefore requires an amendment to the state constitution for legalization.