MONTGOMERY, Ala. (AP) – The state House of Representatives has voted to allow fantasy sports betting in Alabama.

The bill passed 43-38 Tuesday after hours of debate about whether the wagering falls under the state’s anti-gambling laws.

Proponents said the fantasy contests were based on skill and knowledge of sports players. Critics argued the practice was no different than playing cards in a casino.

The measure would regulate fantasy sports contests and tax a portion of the operator’s profits for the state.

Much of the disagreement about the legislation revolved around a 2016 ruling from the Alabama attorney general that said online sports betting websites were illegal.

The bill now moves to the Senate for more debate.