Disney just sold its stake in the New York Yankees’ pay-TV service to a group that includes Amazon.

The film and entertainment giant on Thursday sold its 80% interest in the YES Network to an investment group led by the Yankees and Sinclair Broadcast Group. The deal values the TV service, which broadcasts Yankees and Brooklyn Nets games, at $3.47 billion.

The new owners of YES also include Amazon and investment firms including RedBird Capital, Blackstone and Mubadala Capital, YES Network said.

The Yankees already owned a 20% stake in YES, the country’s most-watched regional sports network in 14 of the past 16 years. YES also owns local TV rights for Major League Soccer’s New York City FC and the WNBA’s New York Liberty.

The Post first reported in March that Amazon would be taking part in the YES deal.

“This transaction brings the YES Network and all of its popular programming even closer to the organization that inspired its very development,” said Yankees CEO Hal Steinbrenner.