MLB Advanced Media, the company that streams video for Major League Baseball and many other clients, is getting ready to spin out its tech operations in a deal that would give the new company a value of at least $3 billion.

And as part of the spinout prep, MLBAM is bulking up: It has signed a long-term deal with pro hockey’s NHL, which will give MLBAM the rights to pro hockey’s digital subscription products, as well as its cable TV property.

In return, MLBAM will pay the NHL $100 million a year for six years, and will also give the hockey league up to 10 percent of the new company.

MLBAM, which is owned by pro baseball’s 30 teams, was originally built to handle digital streaming for pro baseball alone. But over the years it has become a service provider for a wide variety of media companies, including ESPN, HBO and pro wrestling’s WWE.

Pro baseball has flirted for some time with the idea of capturing some of that value by spinning out the company’s tech operations, but now it looks as though it’s going to happen. MLBAM head Bob Bowman says that pending board approval next week, bankers at Evercore and Goldman Sachs will start marketing the new company, BAM Tech, to investors, with an eye toward completing the spinout before the end of the year.

Some of BAM Tech’s new investors will likely be strategic partners that may also want to add some of their assets into the company, Bowman says. While MLBAM will sell rights to individual sports packages through BAM Tech separately, it’s also easy to imagine the newco creating a sports/entertainment bundle of its own.

The NHL deal is the first time MLBAM has paid an entertainment entity for the rights to operate and sell their digital properties. Usually, MLBAM provides basic streaming services for companies with their own front ends, like ESPN; in some cases, like HBO’s HBO Now product, it has been building and operating the system and apps as well.

The NHL deal could allow MLBAM to make more money over time, says Bowman, since MLBAM will be selling advertising against the games. “The upside is principally ours, but there is more risk there,” he said.

The NHL had previously used publicly traded NeuLion to stream its games, and has around 200,000 subscribers paying $169 a year to watch “out of market” games, says NHL Chief Operating Officer John Collins. He says that in addition to the financial component of the MLBAM deal, he likes the idea of aligning his league with at least one other sports league as the media landscape looks like it’s set for significant change.

“When you’ve got [Disney CEO] Bob Iger talking about going over the top with ESPN, and HBO going over the top, and Viacom getting thrown off some cable providers, you start to say, ‘where are we going to be down the road with a single-sport linear network?'” he said.

A Wall Street Journal report in February floated a $5 billion valuation for the property.