NEW YORK (AP) — 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.

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. While 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.

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.