The placement of gambling ads during football game broadcasts shows how much the N.F.L. has changed in its approach toward gambling.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, N.F.L. 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 N.F.L. 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.“We’re trying to do whatever we can to make sure our games are not betting vehicles,” Joe Browne, an N.F.L. spokesman, told The New York Times in 2008.“We have been accused of allowing gambling because it is good for the popularity of the game,” he added. “If that’s true, then we have wasted hundreds of thousands of dollars opposing gambling on our games.”What the N.F.L. once sold as a principled stand, however, has more recently given way to a far more pragmatic one. As betting on football ballooned into a multibillion-dollar industry, and as state after state acted to legalize it, the N.F.L. was left with a stark choice: to continue to fight gambling on its games, or to embrace it in exchange for a significant cut of casino marketing dollars.The proliferation of legalized gambling, like that at a FanDuel sports book in Phoenix, has led the N.F.L. to loosen its restrictions.Matt York/Associated PressAnd that money the league once spent on lobbying against gambling? This season, the N.F.L. is getting it all back. And then some.On its opening weekend, celebrities such as Ben Affleck, Martin Lawrence and Jamie Foxx headlined commercials that aired during N.F.L. game broadcasts, pitching betting as just a click away with a WynnBET, DraftKings, FanDuel or BetMGM account. The NFL Network included betting lines on its ticker for the first time.Belated or not, the N.F.L.’s embrace of gambling is, well, lucrative. League and industry experts expect the revenue from gambling companies for the N.F.L. and its teams to be several hundred million dollars this season.“Over the next 10 years, this is going to be a more than $1 billion opportunity for the league and our clubs,” said Christopher Halpin, chief strategy and growth officer for the N.F.L.Little more than three years after the Supreme Court struck down a federal law that prohibited sports gambling in most states, sports betting companies are meeting an eager audience. GeoComply Solutions, a company that uses geolocation to help confirm that bettors gambling online are doing so from places where betting is legal, said it processed 58.2 million transactions in the United States during the N.F.L.’s opening weekend, more than double what it handled during the same weekend last season.“We expected high volumes, but what we have seen has surprised us nonetheless,” said Lindsay Slader, a managing director with GeoComply, which is based in Canada. “The level of demand across new markets, such as Arizona, indicates that consumers have long waited for the option to legally place a sports bet.”The company said the bets came from 18 U.S. states and the District of Columbia. Soon, more states are likely to join.New York has approved online betting and is in the process of determining which operators will be allowed to take wagers. And sports betting measures are under consideration in heavily populated states such as California, Texas and Florida, where sports book operators are spending heavily to get a foothold.“You have to look at the size of the prize,” said Craig Billings, chief executive of Wynn Interactive. “I think this is going to be the same size of market as the commercial casino industry in the U.S., $40 billion annually or more.”That is why he hired Affleck to direct and star, alongside Shaquille O’Neal, in a commercial, and his company has plans to spend more than $100 million on advertising throughout the N.F.L. season.“Being part of the in-game broadcast is important — it’s our most popular sport with a core audience of early adopters that have been betting offshore,” Billings said. “It’s a rifle shot you have to take.”WynnBET is hardly alone.Through Sept. 9 this year, DraftKings’ spending on national television advertising is up 98 percent compared with the same period a year earlier, while FanDuel’s spending has more than doubled, according to estimates from the research firm iSpot.TV.Overall, gambling companies spent $7.4 million on advertisements during the first week of prime time games, 9 percent more than they did during last year’s opening games on Thursday, Sunday and Monday nights, according to estimates from EDO, a TV ad measurement platform.“The dollars are starting to add up,” said John Bogusz, the executive vice president of sports sales and marketing for CBS Sports.The network saw a surge in advertising interest for N.F.L. broadcasts this year. Bogusz attributed “a good portion” of the growth to sports betting ads.“Overall, the volume is up among all advertisers, but that added to it as well,” he said. “I think it will continue to grow.”Dan Lovinger, the executive vice president of advertising sales for NBC Sports Group, said on a conference call that the surge from sports betting operators was “reminiscent to when the fantasy category opened up.”In 2015, FanDuel and DraftKings spent millions blitzing the airwaves with commercials to gain a larger audience for daily fantasy games, where fans pay an entry fee to assemble rosters of real football players to play against the rosters of other fantasy players.The blitz worked. Sort of.The campaigns attracted customers but also the attention of regulators and prompted complaints from viewers who grew weary of the repetitive advertisements. Both companies spent fortunes on lawyers and lobbyists and endured intact to pivot to sports betting.The average amount of actual game action over the course of a three-hour broadcast of an N.F.L. game is about 11 minutes. Halpin said the league’s internal research showed that among its fans age 21 and older, roughly 20 percent were frequent sports bettors who were mostly young and male, and that another 20 percent — mostly women over 55 — were “active rejecters.”To navigate this stark divide, as well as persuade those in the middle, the N.F.L. decided to limit sports betting ads to one per quarter along with a pregame and halftime spot — six in all per broadcast.It also largely eschewed talk of odds and spreads directly during the biggest N.F.L. game broadcasts.“We have to avoid oversaturation of the game with sports betting talk or risk alienating fans,” Halpin said. “My mother loves her N.F.L., but she doesn’t want gambling talk.” More