Two of the country’s largest newspaper companies have agreed to combine in the latest media deal driven by the industry’s struggles with a decline of printed editions.

GateHouse Media, a chain backed by an investment firm, is buying USA Today owner Gannett Co. for $12.06 a share in cash and stock, or about $1.4 billion. The combined company would have more than 260 daily papers in the U.S. along with more than 300 weeklies. It would be the largest U.S. newspaper company by far, with a print circulation of 8.7 million, 7 million more than the new No. 2, McClatchy, according to media expert Ken Doctor.

The companies said Monday that the deal will cut up to $300 million in costs annually and help speed up a digital transformation.

Newspaper consolidation has picked up as local papers find it hard to grow digital businesses and replace declines in print ads and circulation. Although papers with national readerships like The New York Times and The Washington Post have had success adding digital subscribers, local papers with local readerships are having a difficult time. Hundreds of such papers have closed, and newsrooms have slashed jobs.

According to a study by the University of North Carolina, the U.S. has lost almost 1,800 local newspapers since 2004. Newsroom employment fell by a quarter from 2008 to 2018, according to Pew Research, and layoffs have continued this year.

Both GateHouse and Gannett are known as buyers of other papers. Bulking up lets companies cut costs — including layoffs in newsrooms — and centralize operations.

Those cuts could give the owners “a cushion of time” to figure out how to improve their digital businesses, longtime industry analyst Rick Edmonds of the Poynter Institute wrote Sunday.

But it’s no panacea. “I don’t think, just by these companies merging, they’re going to somehow magically find a new business model, make everything all right and produce robust journalism at a local level,” Butler University journalism professor Nancy Whitmore said.

Still, a bigger, combined newspaper company could sell more national ads and boost their ad revenue, she said.

Several experts said they do not expect the Justice Department to have an issue with the deal, as the two companies have papers in different markets. The companies expect it to close this year.

The combined company would take the Gannett name and keep its headquarters in Gannett’s current home of McLean, Virginia.

Consolidation is nothing new to either company. Gannett’s last big U.S. print purchase was in 2016, when it bought papers in the Journal Media Group chain for $280 million, including the Milwaukee Journal Sentinel and The Commercial Appeal in Memphis. Gannett also owns dailies in major cities such as the Detroit Free Press and Arizona Republic.

Its more recent merger efforts have been unsuccessful. It failed in an unsolicited bid for newspaper chain Tribune. Gannett then fended off an unwanted bid by MNG Enterprises, better known as Digital First Media, a hedge-fund backed media group with a slash-and-burn reputation for cutting jobs and letting papers wither.

GateHouse, a little-known name to U.S. readers, is also controlled by an investment company, but it doesn’t have the same scalding reputation as Digital First. It is owned by the publicly traded New Media Investment Group, itself managed by investment firm Fortress Investment Group, which is in turn owned by Japanese tech giant SoftBank. Gannett and GateHouse said Monday that Fortress will end its management arrangement at the end of 2021.

GateHouse has grown quickly in recent years, and its buying spree includes the Palm Beach Post, bought last year for $49 million, and the Austin American-Statesman, on which it spent $47.5 million. It publishes 156 daily newspapers, most in small- and mid-sized towns.