Virginia Governor Terry McAuliffe walks after a news conference at the Mariel port in Artemisa province, Cuba January 5, 2016. REUTERS/Enrique de la Osa

(Reuters) - Virginia Governor Terry McAuliffe has signed a bill that makes the state the first in the United States to regulate fantasy sports, a multibillion-dollar online business whose legality has been challenged across the country.

The measure signed by McAuliffe, a Democrat, mandates that players be 18 or older, offers players limits on how much they can bet, requires annual audits and bars employees from competing in company contests. It takes effect on July 1.

“This bill, which was passed by super majorities of both chambers, will empower Virginia to regulate this emerging industry and keep consumers safe from abuses,” Brian Coy, a McAuliffe spokesman, said in a statement. The governor signed the bill on Monday.

The growing fantasy sports industry dominated by DraftKings and FanDuel has drawn increased attention from state regulators over the past year, with the attorneys general of New York, Illinois and Nevada questioning their legality. The games are illegal in several states.

The companies charge customers to take part in mostly single-day games in which they draft a roster of players whose performance on the field earns points.

In statements on a sports gaming website, spokesmen for DraftKings and FanDuel welcomed the Virginia measure.

Texas reached a deal with FanDuel last week in which the company will halt paid operations in the state on May 2.