Warren Buffett is getting out of the newspaper business.

Berkshire Hathaway announced Wednesday that it is selling its newspaper operations to publisher Lee Enterprises for $140 million. The deal allows Lee to take ownership of 31 newspapers it has managed since 2018 and expands its portfolio to 81, including the Omaha World-Herald in Nebraska, Tulsa World in Oklahoma and Buffalo News, which Berkshire owned separately from the BH Media Group.

“We had zero interest in selling the group to anyone else for one simple reason: We believe that Lee is best positioned to manage through the industry’s challenges,” Buffett said in a news release. “No organization is more committed to serving the vital role of high-quality local news, however delivered, as Lee.”

The sale comes at a time when industry consolidation is already rampant. In August, the merger of the nation’s two largest newspaper publishers, McLean, Va.-based Gannett and GateHouse Media, created a conglomerate with a combined total of almost 600 daily and weekly papers. Executives from both companies touted the deal as an opportunity to slash as much as $300 million in annual costs within two years, The Washington Post has reported, while “continuing to invest in newsrooms."

Though a lifelong fan of newspapers, Buffett has soured on the industry, which has been in steady decline for more than a decade. Print papers relied on ad revenue for survival, and few have figured out how to navigate a digital landscape where Google and Facebook command 75 percent of advertising revenue. Surviving papers are left fighting over crumbs as the industry takes in $30 billion a year less in ad revenue than it did in 2005.

“It went from a monopoly to franchise to competitive to … toast,” Buffett told Yahoo Finance in April. He predicted that large papers such as the New York Times, the Wall Street Journal and The Post might be able to weather the storm. The rest, he said, would “disappear.”

In fact, they’ve been disappearing for years. About 20 percent of all U.S. newspapers have closed since 2004, according to a recent report from PEN America, and the sector has shed 47 percent of its jobs. Today, 225 counties nationwide are without a local newspaper. Half of all U.S. counties — more than 1,520 — have just one, usually a weekly. Of the nation’s remaining 7,200 newspapers, at least 1,000 are “ghost papers” — meaning they’ve been so hobbled by cutbacks that they produce little original reporting, according to PEN America.

But the sector’s grim trajectory has gone largely unnoticed by the public. A 2018 Pew survey found that 71 percent of U.S. adults think their local news outlets are doing well financially, and just 14 percent have directly paid a local news source, although subscriptions have become crucial to outlets’ survival in the era of dwindling ad revenue. Researchers say the lack of a strong subscription base limits a newspaper’s ability to cover the basics — local government, schools and law enforcement — let alone have the resources for accountability journalism. As a result, it’s the public that suffers.

“The biggest impact of the decline is on communities that are losing coverage each year, the basic news and governments that are going uncovered,” said Ken Doctor, a newspaper analyst. “People are becoming illiterate and innumerate in terms of what they know and how they can act as citizens in a democracy.”

Staff at the Omaha World-Herald were caught off guard by the deal’s announcement, as Buffett had agreed to let the paper seek a local buyer, the newspaper’s guild told The Post. The guild, which represents the 70-plus journalists in the newsroom, had pitched to several potential buyers and was in the process of approaching another, in an effort to keep the paper in local hands, according to a statement emailed to The Post.

“All of those approaches were approved by Mr. Buffett and Mr. Ted Weschler, his right-hand man for newspapers. When they agreed to sell of the World-Herald, they had two requirements as we attempted to find a new owner: They wanted to approve who we were approaching and they wanted us to be discreet,” the Omaha World-Herald guild wrote in the statement. “They knew about the latest approach when they announced today they had decided to put the World-Herald into the hands of an out-of-state national chain. We are blindsided, and disappointed.”

The Omaha-based Berkshire Hathaway, which operates a massive slate of utilities, manufacturers and retailers, will offer more than $575 million in long-term financing to Lee at a 9 percent annual rate, the company said in the news release. This funding will go toward refinancing Lee’s $400 million in debt and allow it to end its revolving-credit facility. After the deal closes, expected in March, Berkshire Hathaway will be Lee’s sole lender. Lee expects the deal to translate to an 87 percent increase in revenue.

“We have enjoyed a strong, long-term relationship with Berkshire Hathaway, which has been a significant investor across our capital structure for years,” Mary Junck, Lee’s chairman, said in a news release. “As manager of BH Media for the past 18 months, we have developed a deep knowledge of these properties and tremendous respect for their operators. We know firsthand the power this acquisition brings for further accelerating our industry-leading digital revenue growth while maintaining our focus on delivering high-quality local news.”

Lee has identified $20 million to $25 million in cost “synergies” and plans to enter into a 10-year lease agreement for the media group’s real estate. The real estate of other papers has become a major target for hedge funds such as Alden Global Capital, which have made a business out of buying struggling papers and slashing staffs to maximize profits and take advantage of their assets. Alden owns the nation’s second-largest newspaper chain, Digital First Media, and has overseen significant cost-cutting at 100 daily papers, causing more than 1,000 jobs to be lost. In a 2018 court case, Alden disclosed that it has affiliated real estate companies whose business is focused primarily on efficiently buying, selling, leasing and redeveloping newspapers’ offices and printing plants.

Lee shares skyrocketed on the news, and were up 82.5 percent, to $2.30, by early afternoon.