Gray Television is buying Raycom Media for $3.65 billion in cash and stock, creating the third-largest owner of local TV stations in the U.S.

Together, the companies will have 142 full-power stations serving 92 markets. The deal will consist of $2.85 billion in cash, $650 million in a new series of stock, and 11.5 million shares of Gray common stock.

Despite headwinds from overall migration away from live, linear viewing and advantages enjoyed by digital competitors in the advertising arena, local TV has become a resilient sector of late. Sinclair Broadcast Group is still looking to close its long-gestating acquisition of Tribune Media, which would create a super-power with truly national reach. And local is also at the core of 21st Century Fox’s strategy for its existence after selling its studio and cable network assets to either Comcast or Disney.

Raycom President and CEO Pat LaPlatney will be president and co-CEO of the new entity, which will continue to be known as Gray. Current Gray CEO Hilton Howell will become executive chairman and co-CEO after the close of the deal, which is expected in the fourth quarter.

Raycom Media

With regulation easing and consolidation continuing to reshape the marketplace, the companies said joining forces would position the new entity well. The official announcement of the deal projects “only minimal regulatory issues,” with overlap in mid-sized markets like Knoxville, Tenn., and Toledo, Ohio. Stations there will be sold off to third parties.

“Combining our company with the excellent Raycom stations and the superb Raycom employees will create a powerhouse local media operation,” Howell said. “Together, this new portfolio of leading local media outlets will excel at what they do best, which is to provide the local news that local communities trust, the entertainment and sports content that viewers crave, and the incredible reach that advertisers demand.”

Raycom’s LaPlatney saluted Gray’s “core values of journalistic excellence and community service.” As a merged entity, he added, “we will be a stronger, more impactful force for our audiences, advertisers, and communities.”