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: Junk Workers Rescue Man Pinned Under Car In Hopkinton

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: Police Release Surveillance Photos Of Car After Somerville Hit & Run

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

MORE NEWS: Grafton Family Displays More Than 17,000 Flags For Massachusetts COVID Victims

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