"This historic partnership will bring millions of NBA fans and MGM Resorts guests together through an innovative collaboration that will open new and exciting opportunities to engage with each other's world-class brands and products," MGM Resorts and the NBA said in a press release Tuesday. "The partnership is the NBA's first with a sports betting operator in the U.S. and is the first of its kind between MGM Resorts and a major professional sports league."

MGM Resorts and the National Basketball Association have entered into a multiyear partnership, establishing the casino company as the official gaming partner of the NBA and WNBA, they announced Tuesday.

In May, the U.S. Supreme Court ruled that states can legalize sports betting, breaking up Nevada's monopoly on the practice.

"As the landscape for sports betting in the U.S. continues to evolve at a rapid pace, MGM Resorts is a proven gaming leader for us to work with on this groundbreaking partnership," NBA Commissioner Adam Silver said.

Silver said the agreement will enable innovative in-game gambling.

"Most of the action outside the United States is moved to what's called in play," Silver said Tuesday on CNBC's "Power Lunch." "In Europe it's 80 percent and higher, and that can be anything to the amount of points a player scores in a particular quarter. It can be based on something like rebounds ... That's really where you get the engagement."

MGM said it will use NBA and WNBA branding across its U.S. properties on a non-exclusive basis and share real-time data with the NBA to protect the integrity of its games.