Relativity Media chief Ryan Kavanaugh is near a deal to sell a minority stake in the movie studio to a JPMorgan-led group of investors for as much as $800 million, The Post has learned.

JPMorgan will buy hedge fund Elliott Associates’ 49 percent stake in Relativity for upwards of $750 million, including roughly $500 million in equity and $250 million in debt, a source close to the talks said.

JPMorgan is raising the funding with the help of investors in China, India and Europe, the source added. “They want Relativity to buy stuff and grow fast,” said the source.

The deal values Relativity, whose films include “300,” “Mamma Mia” and “Hancock,” at upwards of $1.6 billion, with Kavanaugh retaining his 51 percent majority stake in the indie studio.

The 36-year-old Kavanaugh has the right to buy out Elliott’s stake in Relativity for a certain price — north of $700 million — under an option he received several years ago.

Sources said the New York hedge fund doesn’t want to sell its stake but doesn’t have much of a choice because of Kavanaugh’s option.

Kavanagh has been feuding with Elliott since the hedge fund pulled its financial support, in part because it believed Kavanaugh’s spending was out of hand.