It didn’t take long for online fantasy sports to start making money. The first hockey and baseball leagues went online in the mid-nineties, and similar companies started selling for tens of millions by the early 2000s.

But in the past decade, fantasy sports — in particular, leagues that allow players to bet money on their outcomes — have exploded in popularity and revenue, transforming into billion-dollar industries. But where money goes, crime follows, and for the past year the New York Times and PBS have been investigating the two largest sites, FanDuel and DraftKings, which together make up 90 percent of the market for daily fantasy sports wagering.

The Times and PBS first turned on the heat back in September, noting the cozy relationship between the NFL, which is ostensibly against sports gambling, and the major fantasy sites.

It was game on from there, as the Times investigative series took off at full speed.

The FBI opened an investigation in October, particularly after the Times revealed that employees of both FanDuel and DraftKings had been using their access to get early statistics to make massive amounts of money on their respective rival site. But even then, the fantasy websites continued to gladly accept customers’ money.

In November, New York Attorney General Eric Schneiderman ordered DraftKings and FanDuel to stop taking bets from residents of New York state. FanDuel caved, but DraftKings decided to take the “N.W.A. approach” and continue their operations in spite of the AG’s order, claiming that fantasy sports were games of skill, and not gambling. As of January, both sites are back up and running in New York, amid the appeal process.

The battle and scandal spread across the country, with state governments fighting it out with gambling loopholes and fantasy sports sites routing online payments (to escape a 2006 online gambling law) through offshore holdings and shell companies, creating digital loopholes for bettors in states where the sites are banned, and setting up “shadow banking” organizations to keep the money flowing.

Watch the full Frontline documentary here: