BOSTON (AP) — The NBA has agreed to a multiyear deal making DraftKings an official sports betting operator.

The Boston-based company joins a half-dozen others, including MGM and longtime daily fantasy sports rival FanDuel, with deals that allow them the rights to official betting data and NBA logos.

READ MORE: Clean Up Efforts Could Take Days With Trees And Power Lines Down In Barnstable

Professional sports leagues have long banned any connection to gambling. But in the past few years they have embraced it and sought to profit from both daily fantasy sports and outright gambling on games. Last year, the U.S. Supreme Court tossed out a law that in effect prohibited sports gambling in most states.

READ MORE: Julian Edelman Can't Believe Bill Belichick Smiled After Beating The Jets

The league says it will work with DraftKings to protect the integrity of NBA games.

MORE NEWS: Hunter Henry Ready To Do Anything For Patriots In 'Bittersweet' Matchup Against Chargers

(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)