Nexstar reached an agreement today to buy Media General and pay Meredith Corporation $60 million to walk away from a deal that would have seen it merging with the broadcast giant.

The result will be a $4.7 billion transaction that creates a group with 171 full-power television stations in 100 markets. Combined, the companies will reach 39 percent of U.S. households. The new name of the company will be Nexstar Media Group.

In an announcement, Nexstar chief Perry Sook said the acquisition would put into motion "transformational growth opportunity for Nexstar."

The transaction increases Nexstar’s broadcast portfolio by approximately two-thirds with very limited overlap with our existing properties, more than doubles our audience reach, provides entrée to 15 new top-50 DMAs and offers synergies related to the increased scale of the combined digital media operations.

The new company will generate more than $2.3 billion in annual revenue and increase cashflow by more than $500 million, according to the announcement. It will spend that money to grow and maximize its return to shareholders.

The companies said they hope to complete the transaction by the end of the year.