Betting has long been a part of the National Football League’s DNA. Two of its founding fathers, Art Rooney and Tim Mara, were gamblers.

Rooney bankrolled the early years of the Pittsburgh Steelers with a small fortune he won at Saratoga Race Course. Mara, his close friend, was a bookmaker who bought the New York Giants for $500.

For decades, however, NFL officials went to great lengths to distance the league from the tens of billions of dollars wagered on its games — legally in Las Vegas but also with offshore sports betting shops, in office and bar pools and among illegal bookies. The NFL backed the Unlawful Internet Gambling Prohibition and Enforcement Act of 2006 and fought New Jersey’s efforts to allow its casinos and horse tracks to take bets on football games.