Indiana became the second state with a law formally legalizing daily fantasy sports after Gov. Mike Pence signed SB 339 on Thursday.

Earlier this month, Virginia became the first state to pass such a law.

States have taken vastly different approaches as they try to clarify the murky legality of the games. New York’s attorney general has declared them illegal and the industry’s two largest companies, DraftKings and FanDuel, agreed this week to stop taking bets in the state.

In Maryland, a bill would put the question to voters in a November referendum.

The Indiana law sets a minimum age of 18 for players. It prohibits the use of college and high school sports results in a daily fantasy sports contest.

The Indy-based NCAA supported an amendment limiting daily fantasy sports games to professional sports. The national group of high school sports associations also has its headquarters in Indianapolis.

The Indiana law also prohibits the use of horse race results, a nod to race tracks in Anderson and Shelbyville. Those “racinos,” however, will be allowed to conduct their own daily fantasy sports games, as will the state’s off-track betting locations.

The industry will be regulated by a newly created Paid Fantasy Sports Division of the Indiana Gaming Commission. Companies will have to pay an initial registration fee of $50,000, an amount industry critics of the bill said favors DraftKings and FanDuel by setting the barrier to entry too high for upstart companies.

Griffin Finan, director of public affairs for DraftKings, said in a statement, “Today, Indiana became yet another state to put in place a thoughtful and appropriate regulatory framework to protect the rights of fantasy players. We thank Governor Pence for his leadership and advocacy and are hopeful that other states across the country will follow Indiana’s lead.”

The Washington, D.C., non-profit Stop Predatory Gambling criticized Pence, saying it breaks his campaign pledge not to expand gambling.

During debate on the measure, there was confusion by lawmakers about how many Hoosiers play daily fantasy sports. Between 500,000 and one million play all fantasy sports, including the season-long games typically organized among friends. The Fantasy Sports Trade Association said 50,000 to 150,000 Hoosiers play daily fantasy sports.

Daily fantasy sports involves players receiving points based on how real-life athletes perform on a particular day. Players fill out their lineups by “buying” the athletes they want, all of whom carry varying fictional price tags. Players must stay within a maximum budget when making their lineups. Players can enter one-on-one matches for $1 or games with higher fees and thousands of participants competing for seven-figure prizes.

FanDuel and DraftKings became ubiquitous on sports television during the start of the past football season with a torrent of ads. The companies have mainstream investors, including major professional sports leagues.

In October, the Wall Street Journal reported that the FBI was investigating the industry, including allegations that DraftKings employees used inside information to profit on a competing site.

Contact Mark Alesia at (317) 444-6311 and follow him on Twitter: @markalesia.