After nearly a century of zero-tolerance policies that treated gambling as a mortal threat, U.S. sports leagues are rapidly cutting deals with companies involved in sports betting.

To varying degrees, the leagues are partnering -- openly and in secret -- with oddsmakers, betting prognosticators and data providers that make sports wagering possible in the digital age, according to interviews with a range of sports gambling officials and experts.

The deals lay the groundwork for the NFL, the NBA, the NHL and Major League Baseball to profit if sports betting is legalized in the United States, as many experts predict. But for now, the deals have drawn the leagues into a shadowy, unregulated world that includes some companies that have been accused of operating illegal sports betting enterprises.

Among the recent developments:

The NFL in April became a part owner of newly formed Sportradar US, the subsidiary of a Swiss company that provides real-time statistics, scores and odds to bookmakers, including, according to gambling industry sources, multiple offshore sportsbooks that offer illegal betting in the U.S.

Last July, the NBA, through its ownership stake in FanDuel, became part owner of numberFire, a New York tech company that offers sophisticated analysis for daily fantasy and sports wagering, including betting recommendations on the league's own games.

Shortly after the World Series in November, Major League Baseball signed a deal with a London-based company, Sport Integrity Monitor, to monitor betting lines and identify suspicious betting activity that might indicate fixed games. SportIM's parent company sets odds and provides software for legal bookmakers in Europe and Asia.

The partnerships, unique to each league, give them a foothold in an industry estimated to generate as much as five times the combined $25 billion in revenue of the four major sports. Perhaps just as important, the deals also, in the case of the NBA and NFL, have opened up new and potentially lucrative revenue streams. The product the leagues are selling? Live data -- the instantaneous statistics that form the lifeblood of sports wagering, just as a continuous stream of financial information fuels the stock market. Dollar figures for the deals remain largely unknown, but a recent agreement between Sportradar and the International Tennis Federation offers a glimpse at the stakes: Sportradar is paying the ITF $70 million over five years for exclusive access to live match data.

"A subtle bridge is being built," said Chris Grove, the editor of legalsportsreport.com, an online newsletter that tracks the sports betting industry closely. "This sort of activity, I think we're seeing it normalized."

League officials also hope they can use data to prevent the types of scandals that have periodically rocked the major sports and were most recently seen in professional tennis. Buzzfeed and the BBC reported on Jan. 17 that studies of betting pattern data indicated that more than a dozen top-50 players had been involved in fixing matches and that the sport's integrity unit overlooked the information.

But the deals come with some risk for the leagues, which are embracing an industry that is changing rapidly and pushing the boundaries of federal gambling laws. The New York attorney general's investigation into daily fantasy has sought information about the leagues' relationships with FanDuel and DraftKings, according to sources familiar with the probe. Both the NBA and Major League Baseball are equity partners in FanDuel and DraftKings, respectively, and nearly every pro team -- including 28 NFL teams -- has a sponsorship agreement with one of the rival companies. The NFLPA also has licensing deals with DraftKings and FanDuel.

Yet even with the potential risks, the leagues' moves into the sports gambling industry seem inevitable, said Nevada state Sen. Mark Lipparelli, the former leader of the Nevada Gaming Control Board.

"To the extent that they don't participate, they do so at their own peril," he said. "You can't be late to the party and expect that everyone else who's come to agreement is going to shift their position to your concern."

Technological advances have changed the gambling industry and how and when people place bets. Once largely centered around game outcomes and point spreads, sports betting now also includes dozens, sometimes hundreds, of betting scenarios within a single game or match.

Partnering with sports leagues allows data providers and bookmakers to provide that key information in real time. Without a direct, official feed, the data providers are forced to log information from spotters in stands or via TV and Internet broadcasts, less accurate systems that can cause transmission delays up to 30 seconds -- an eternity in live wagering.

"That's where basically everything is going," said one Las Vegas bookmaker. "They want to be able to say, 'Hey, we're partners with the NBA and have the fastest data out there.' When you're talking a few milliseconds faster than anyone else, it makes it a big difference."

For years, U.S. sports leagues have steadfastly opposed attempts to legalize Vegas-style sports betting, fearing it would corrupt their sports. In the most visible example, the four major leagues and the NCAA are suing New Jersey to prevent sports betting from becoming legal in that state. The court case continues next month. In November 2012, former MLB commissioner Bud Selig, one of several sports officials to testify against legalization, called gambling an "evil" that "destroys your sport" and vowed to "fight it with every fiber of energy that we have."

But the leagues -- including MLB -- appear to be softening in response to the growing acceptance of gambling as entertainment and the potential windfall.

NBA commissioner Adam Silver's call for legal, federally regulated sports betting in a New York Times editorial in November 2014 has been cited as a tipping point. New MLB commissioner Rob Manfred said last year the issue deserves "fresh consideration."

In an interview this fall with Outside the Lines, Silver said the league's relationships with gambling companies help the NBA look for signs of "irregularities, just like the New York Stock Exchange can monitor insider trading."

While the NFL continues to publicly oppose sports betting, it has quietly strengthened its ties to the industry.

As recently as November, NFL commissioner Roger Goodell reiterated his opposition to sports betting, telling ESPN's Mike & Mike Show: "We think that is a mistake for sports."

Yet last April, the league walked away from its longtime data partner, Stats LLC, and struck a deal with Sportradar US, at the time a newly formed American subsidiary of Switzerland-based Sportradar AG, best known for providing sports data to bookmakers in Europe and Asia.

Sportradar struck similar data deals with the NHL, NASCAR and the ITF, although, unlike the NFL agreement, none included an ownership stake in the company. The company also has deals with FanDuel, media clients and social media firms. Sportradar is fueling Facebook's new platform, Facebook Stadium, which allows users to follow major sporting events live, within Facebook.

The size of the NFL's stake in Sportradar has not been disclosed. In late October, Michael Jordan, Dallas Mavericks owner Mark Cuban and Ted Leonsis, owner of the Wizards and Capitals, announced a $44 million investment in Sportradar US.

Ulrich Harmuth, the president of Sportradar US, told Outside the Lines that gambling was not part of the negotiations with the NFL. "We're the official partner for the NFL, and they didn't want us to distribute any NFL data, regardless of the source to gambling companies," Harmuth said.

But one source with knowledge of the NFL's negotiations said gambling was "a big part of the discussion," with the NFL expressing interest in the potential for using league data in sports betting.

NFL spokesman Brian McCarthy declined to be interviewed by Outside the Lines but wrote via email that "there is a strict prohibition on distribution of the NFL's official data feeds to any gambling-related activity or entity, globally. ... We have been consistent in our position that NFL data cannot be distributed to any gambling institutions. Our agreement with Sportradar US reflects that."

When asked whether the NFL's public opposition to gambling conflicts with its decision to partner with a company so enmeshed in the gambling industry, McCarthy reiterated that the NFL's deal was with Sportradar US.

Records show Sportradar US was incorporated domestically just weeks before the announcement of the NFL deal. About the same time, the menu tab for "Betting Solutions" disappeared from the Sportradar home page, as did "bookmakers" from the list of clients. Sportradar's marketing materials published after the NFL deal, which tout its status as the NFL's "official" data provider and use NFL-copyrighted materials and trademarks, do not make any distinction between European and U.S. branches.

Sportradar AG provides NFL data to bookmakers through an "unofficial feed" manually logged from broadcasts, the company acknowledged. According to Harmuth, that practice does not violate its partnership with the NFL, because that agreement is with Sportradar US -- not the parent company.

Live, in-game data are the instantaneous statistics that form the lifeblood of sports wagering, just as a continuous stream of financial information fuels the stock market. George Rose/Getty Images

Some of Sportradar's clients have run afoul of U.S. authorities. In December, The New York Times linked a Sportsradar-affiliated company with offshore bookmakers, including BetCRIS, which has been tied to multiple gambling prosecutions in the United States. Gambling industry sources confirmed to Outside the Lines that Sportradar does business with at least five offshore sportsbooks operating illegally in the U.S.

Those companies include Bovada, the sources said. Bovada is one of the largest online providers of illegal sports betting in the U.S. Sportradar provides odds for Bovada, which offers live betting on a variety of global sports, including NFL games.

In December, Bovada offered 79 bets on a single Thursday night game featuring the Packers and Lions, with the odds shifting constantly. When the Packers fell behind 20-0, Bovada changed the "money line" to +900 -- meaning a $100 bet would win $900 if Green Bay came back. The Packers won on Aaron Rodgers' last-second heave to Richard Rodgers.

Jeff Ifrah, a Washington attorney who has represented numerous clients in the gambling industry, said the partnerships show how the NFL no longer views sports betting as a threat to the sport's integrity -- regardless of Goodell's pronouncements. "If you take an equity interest in a company that's running lines on the games that your teams are playing, then you must have gotten over that issue," he said. Ifrah has not represented the NFL.

Bovada was spawned from Bodog.com, a popular offshore sportsbook registered in Latvia. In 2012, a U.S. federal grand jury in Maryland indicted the company's founder, Calvin Ayre, charging him and three associates with operating an illegal sports gambling enterprise. Ayre appeared on the Department of Homeland Security's most wanted list as recently as 2014.

After U.S. authorities seized Bodog's domain name, the company migrated its U.S. customers to Bovada. The sportsbook circumvents U.S. gambling laws by routing credit card transactions through third countries; deposits recently made in California by Outside the Lines showed the transactions occurring in South Korea.

A Sportradar spokesman said the firm "has a strict policy to only provide data to licensed bookmakers" and contractually obligates them to avoid jurisdictions where gambling is illegal. Sportradar, a spokesman said, would terminate the relationship if a bookmaker loses its license or is "found by U.S authorities to be engaged in illegal betting operations."

In November 2014, Sportradar AG struck a deal with CG Analytics, a data firm that is part of CG Technology, which operates nine Las Vegas sportsbooks. Several months earlier, CG Technology -- then known as Cantor Gaming -- paid the largest fine in Nevada history at $5.5 million after the Nevada Gaming Control Board connected a company manager to an illegal betting ring.

CG Technology, a subsidiary of the Wall Street firm Cantor Fitzgerald, does not receive official NFL data from Sportradar, said Matthew Holt, the company's chief operations officer, adding: "That may change in the near future." Holt said CG receives NFL data through Sportradar's unofficial feed, built through manually logging live broadcasts.

The NFL's hairsplitting was taken to new extremes in November, after Sportradar announced that it would provide NFL data for a new mobile application that allows consumers to bet on the outcome of every play. A league spokesman said the deal was completed without the NFL's consent and "is not permitted." Sportradar quickly backtracked, amending the announcement to say the data would be used only for non-cash, social gaming.

But iPro, which produces an app called "ringit!," said it intends to move ahead with sports betting for cash, including NFL games. Sportradar, according to iPro, is providing the data for iPro's social gaming options and for cash fantasy play. The company refused to say where the data to fuel cash sports betting would originate.

Robert Melendres, a longtime gambling executive who is iPro's CEO, said he understood the NFL's sensitivity. Asked if he believes the NFL is opposed to gambling, he laughed.

"I respect their position. I just take it at face value," Melendres said.

To varying degrees, major U.S. sports leagues are partnering -- openly and in secret -- with oddsmakers, betting prognosticators and data providers that make sports wagering possible in the digital age. Kirby Lee/USA TODAY Sports

More than any league, the NBA is pushing the envelope on sports betting.

Last year, the NBA held talks about a potential advertising deal with BetCRIS, the offshore sportsbook that has been named in multiple federal indictments, according to two sources familiar with the discussions. An NBA spokesman confirmed the talks but said the two sides were never close to an agreement.

The league also extended a deal with Perform, a London-based firm, to stream at least 250 NBA games through Perform's "Watch & Bet" channel, which allows viewers to place bets as they watch NBA games in Europe, where sports betting is legal and widespread. The NFL has a deal with Perform for U.S. distribution of short-form video content, NFL spokesman McCarthy said. Perform can distribute some NFL content in Germany, McCarthy said, but is "expressly prohibited from distributing to any site, app, etc. with any gambling affiliation."

The NBA announced its partnership with FanDuel on Nov. 12, 2014, one day before Silver's New York Times editorial. Silver told Outside the Lines the league was motivated not only by fan engagement and business opportunities but also by the potential to track irregularities. The league acquired a small ownership stake -- less than 10 percent, according to sources -- in exchange for making FanDuel the league's official fantasy partner.

"By having equity in that company, and having access to the inner workings of that company, it was our view that we're much better off being inside the tent than outside the tent," Silver said. "What comes with that involvement is access to data. When every participant has to identify him or herself, when he or she has to register with a credit card, to the extent that there are irregularities, you can track it directly."

But the scope of the NBA's investment in FanDuel stunned some experts. The move was all the more surprising given the league's recent history. In 2008, referee Tim Donaghy went to prison after giving tips to gamblers in exchange for cash, perhaps the worst scandal in the league's history.

"The most shocking thing to me is the level of involvement," said Timothy Fong, co-director of the Gambling Studies Program at UCLA. "This isn't like a first date. This is a first date and they went all the way."

The NBA's partnership with FanDuel gave daily fantasy a stamp of legitimacy, even as the legality of the contests remained unclear. The NBA's president of global operations and merchandising, Sal LaRocca, took a non-voting seat on FanDuel's board. In July, after raising $275 million, the company bought numberFire, a tiny analytics firm with a charming backstory and a business model that blends daily fantasy with sports betting.

Nik Bonaddio, an information systems expert from Pittsburgh, founded numberFire in 2009 after winning $100,000 on "Who Wants To Be A Millionaire." Bonaddio, 34, said he treated the unexpected windfall as if he had been "walking down the street and found a sack full of money." He decided to start a business that combined his expertise in data with his love of sports.

NumberFire ingests huge amounts of data and uses proprietary algorithms to spit out analysis on every player and every game in the four major sports. It offers for free daily fantasy articles and player analysis. Behind a paywall, numberFire offers not only customized daily fantasy lineups but also betting recommendations on NBA, NFL, NHL, Major League Baseball and NCAA football and basketball.

"The way we look at it, we're sort of agnostic with what someone wants to do with our information," Bonaddio said.

Three gambling experts said they were unaware of any previous instance in which a major U.S. sports league had offered betting recommendations through a partner it has an ownership stake in. NFL.com, MLB.com, NHL.com and NBA TV provide fantasy advice.

When the NBA deal with FanDuel was announced in 2014, FanDuel CEO Nigel Eccles called it "a true partnership." The NBA has downplayed its relationship with the company, noting that LaRocca is a non-voting observer on the board and that the league put no money into the deal. Silver emphasized that the NBA is "not a decision-maker" in FanDuel and did not vote on the numberFire acquisition.

Silver said the NBA was aware that numberFire offered betting advice at the time of the deal. He compared the league's relationship with numberFire to the broadcasting partnership with ESPN, which also offers gambling predictions.

"We are completely independent of FanDuel or any company that they have acquired when it comes to betting on sports contests," Silver said.

Daniel Wallach, a gambling attorney with Becker & Poliakoff in Fort Lauderdale, Florida, said the NBA's association with numberFire was consistent with the league's strategy.

"This is not coming out of nowhere," Wallach said. "This is part of a strategic plan by the NBA to monetize and avail itself of all the benefits and revenues associated with daily fantasy and sports betting but at the same time ensuring that its integrity is protected. That's a delicate balance."

Once largely centered around game outcomes and point spreads, sports betting now also includes dozens, sometimes hundreds, of betting scenarios within a single game or match. AP Photo/John Locher

The leagues' aggressive push into daily fantasy has dragged them into a growing legal morass.

Arizona, Iowa, Louisiana, Montana and Washington prohibit daily fantasy, and at least 20 other states are reviewing the legality of the contests. State attorneys general in New York, Illinois, Hawaii, Texas and Vermont have said daily fantasy violates their states' gambling laws. Nevada officials say daily fantasy meets the state's definition of sports gambling. A Florida grand jury is investigating whether daily fantasy violates federal gambling laws, according to multiple legal sources.

One sports league official familiar with the New York probe indicated that he has received assurances that investigators there are focusing on the individual companies -- not the leagues -- but some gambling experts believe the leagues may ultimately draw scrutiny from law enforcement authorities, regulators and class action attorneys.

"If I was the general counsel of the NBA right now, I would be very, very concerned," said Marc Dunbar, a partner with Jones Walker in Tallahassee, Florida, who teaches gambling law at Florida State University.

In late November, the first class action lawsuit to target the sports leagues was filed by two daily fantasy players in Florida. The suit charged investors, including the NBA and Major League Baseball, with facilitating illegal gambling under state and federal laws. The suit chided the NBA and MLB for hypocrisy, with the NBA forcing Donaghy's resignation and baseball banning Pete Rose while, at the same time, encouraging gambling on their sports.

Major League Baseball said its deal with Sport Integrity Monitor, announced after the World Series, is designed to monitor betting lines for wild swings that could indicate a fixed game. SportIM has a similar arrangement with the English Premier League to monitor the lines on soccer matches. Unlike with the EPL, however, SportIM is unable to harvest MLB data and distribute it to bookmakers.

"This is strictly, honestly, just for integrity purposes," said Dan Halem, MLB's chief legal officer. "We don't provide any data to the company that they are permitted to use or distribute for any purpose."

Data tracking as a potential illegal betting monitoring tool was most recently seen on Sunday, when a sports gambling website said it had suspended betting on a mixed doubles match at the Australian Open because the obscure match attracted an unusual amount of betting.

But the lines between leagues and all types of sports gambling-related companies are blurring so rapidly that even people who have followed the industry for decades are wondering what will come next.

"It goes back to the fundamental question: To what purpose are the leagues doing this?" said Fong of UCLA's Gambling Studies Program. "Is this something that will make the product better? Or is it just straight greed?"

Editor's note: ESPN has business relationships with numberFire and Stats LLC. ESPN International has an advertising deal with BetCRIS.