The Dolan family is saying au revoir to Cablevision, selling the flagship cable company it founded more than 40 years ago to French telecom giant Altice.

The surprise sale for $9.8 billion, plus the assumption of roughly $8 billion of debt, was announced early Thursday by Cablevision.

The sale includes the Long Island tabloid Newsday and news Channel 12.

Altice will now inherit 2.78 million broadband customers and 2.64 million pay-TV customers on Long Island and around the New York metro area.

Altice will also gain control of the 400,000-circulation newspaper and the seven regional Channel 12 cable news networks.

Dolan family patriarch Charles Dolan, sometimes known as the father of cable TV, founded Cablevision in 1973, when the field was in its infancy.

The company took control of Madison Square Garden and its Knicks and Rangers sports teams in 1997 before spinning them off into a separate company in 2010.

The cable industry has been consolidating for years — and Cablevision, like many other pay-TV outfits, has been the subject of many sale rumors in recent years.

But now, with Charles Dolan all but retired and son James busy serving as the executive chairman of MSG and on the board of family-controlled AMC Networks, many are saying the time is right for the family to sell one of the pieces of its sports, media and entertainment empire.

“Since Charles Dolan founded Cablevision in 1973, the Dolan family has been honored to help shepherd our customers and employees through the most extraordinary communications revolution in modern history. Now, nearly half a century later, the time is right for new ownership of Cablevision and its considerable assets,” James Dolan said in a statement.

“For the Dolan family, we move forward with AMC Networks and The Madison Square Garden Company — two and, eventually, three public companies — all born of Cablevision and each with brighter prospects today than ever before,” he continued.

Together, MSG and AMC are worth more, about $11.1 billion combined, than Cablevision’s $7.9 billion value.

Cablevision stock has been on a tear of late, driven up by the wave of consolidation roiling cableland. Over the past 12 months, Cablevision has increased its stock price by 48 percent, and is up 38.3 percent year-to-date.

The offer from Altice’s owner, French billionaire Patrick Drahi, 52, is part of a wider effort by the company to expand its US holdings.

In May, Drahi shocked the pay-TV industry by acquiring a 70 percent stake in St. Louis-based Suddenlink — a deal that valued the Midwest cable company, with about 1 million subscribers, at $9.1 billion.

Altice had also approached Time Warner Cable management about buying it — but Charter Communications beat it to the punch.