A bill to legalize sports betting in Minnesota cleared its first test at the Legislature on Thursday but faces an uncertain future amid tribal opposition.

Senate Tax Committee Chairman Roger Chamberlain’s bill passed his own panel on a 5-2 vote Thursday. It goes to the Senate state government committee, but the Lino Lakes Republican acknowledged in an interview it may not pass this session.

The bill would allow sports betting only at the state’s two horse-racing tracks, Canterbury Park in Shakopee and Running Aces in Columbus; its 21 tribal casinos; or via mobile device apps linked directly to the tracks or participating casinos. The state would collect a 6.75 percent tax on total bets placed minus winnings.

“People do make a very good living off of this, and they also have a lot of fun,” Chamberlain testified. “We’re just trying to create a legal structure on that to … legalize it, regulate it, make it safe and accessible to people.”

Minnesota’s 11 federally recognized tribes have opposed expansion of off-reservation gambling for over two decades, and oppose the new effort. John McCarthy, executive director of the Minnesota Indian Gaming Association, said gambling is the only successful economic development tool the tribes have ever had.

He said authorizing online gaming via mobile devices “would be the largest expansion of gambling in Minnesota in more than a quarter century” and would likely lead to legalization of further internet gaming.

It’s not clear how much tax revenue the state could collect from legalized sports betting. Chamberlain estimated Minnesotans could wager $2 billion to $3 million annually. A Minnesota Department of Revenue analysis on the bill said the impact is “unknown.”

Jake Grassel, executive director of Citizens Against Gambling Expansion, warned that any gains would be outweighed by social costs such as problem gambling, crime, bankruptcies, divorces and social services for affected families.

The U.S. Supreme Court struck down a federal sports gambling ban last spring. It’s now legal in eight states, including Nevada, which had a monopoly before, and it’s being considered in some others including neighboring South Dakota. But a 50-state review by The Associated Press published this month found that legalization efforts are nonexistent or very unlikely to happen anytime soon in the nation’s three most populous states — California, Florida and Texas — which together hold more than a quarter of the U.S. population. As in Minnesota, tribal opposition is a factor in several states.

No hearing has been scheduled on a sports betting bill in the Minnesota House that would allow wagering only at tribal casinos. The tribes oppose that bill, too. Its author, Farmington Republican Pat Garofalo, tweeted that Thursday’s vote was “good news for advocates, but it is clear that the public is going to have to engage more if supporters want to see sports gambling become law in Minnesota.”