Fox is planning to debut a legalized sports betting product in partnership with Canadian gambling company The Stars Group, marking the first time a large legacy media company is branding a betting product.

Fox Bet will launch in the fall of 2019, the company said in a statement. Initially, Fox will debut two products, a free-to-play game and a real money wagering platform in states with legalized gaming, which will rival companies such as FanDuel and DraftKings.

Fox will invest $236 million in The Stars Group in exchange for about 5 percent equity in the company. The Stars Group rose more than 10 percent after hours and has a market capitalization of about $5 billion.

As part of the deal, Fox Sports said it will grant an exclusive license to The Stars Group for the use of certain Fox Sports trademarks to online sports wagering. Prior to the 10th anniversary of the commercial agreement, Fox Sports has the right acquire up to a 50% equity stake in The Stars Group's U.S. business.

"Digital sports wagering represents a growing market opportunity that allows us to diversify our revenue streams, connect directly with consumers and expand the reach of the FOX Sports brand," said Fox Sports CEO Eric Shanks in a statement.

So far, legacy media companies that own broadcast rights to sports, such as Comcast and Disney, have stayed in the background with sports wagering. While Disney has considered investing in DraftKings and Comcast Ventures has invested in FanDuel, major media companies have stayed away from fronting the business or marketing branded products.

"I don't see The Walt Disney Company, certainly in the near term, getting involved in the business of gambling, in effect, by facilitating gambling in any way," Disney CEO Bob Iger said during his company's first-quarter earnings conference call in February. "Getting into the business of gambling, I rather doubt it."

Sports gambling has been legalized in eight states. A total of fifteen states could legalize by the end of the year and 30 by next year, according to Patrick Keane, CEO of The Action Network, a research and analytics company dedicated to sports gambling.

Still, mobile betting companies must get licensed and operational after legalization. New Jersey is the only state where there is robust competition for operational legalized sports betting. Thus far, FanDuel and DraftKings account for more than 80% of the New Jersey market.

WATCH: How the gambling industry will continue to grow