Amazon is coming to New York — to grab a piece of the Yankees sports network.

Jeff Bezos’s tech giant has teamed up with the storied baseball organization in an effort to buy the YES Network from its majority owner, 21st Century Fox, according to two people close to negotiations who declined to be identified because the deal wasn’t yet official. If it goes forward in its current form, the deal is expected to take a few months to close.

The Yankees will become the largest shareholder in the channel, a regional sports-focused network serving the New York metropolitan area that has been valued at just under $3.5 billion, the people said. That’s less than the approximately $4 billion it was worth five years ago, when 21st Century Fox increased its stake to 80 percent.

Joining the deal are Sinclair Broadcasting, Redbird Capital, the Blackstone Group and others.

The YES network was borne out of a partnership struck in 1999 between the Yankees and the Nets basketball franchise. The Yankees, whose business operation has been led by Randy L. Levine, its president since 2000, formally took over the project in 2004 and sold a 49 percent stake to Rupert Murdoch’s 21st Century Fox in 2012. A second deal, in 2014, gave the Murdoch company control of the company and left the Yankees with a 20 percent stake.

The Walt Disney Company, the new owner of most 21st Century Fox assets, is managing the current deal as part of its plan to sell YES along with 21 other regional sports networks. The sell-off of those properties was a condition of the Justice Department’s approval of Disney’s $71.3 billion acquisition of the 21st Century Fox assets last summer.