U.S. telecommunications company Nexstar Media Group Inc has inked an agreement to purchase media and entertainment company Tribune Media Co for approximately $4.1 billion.

Nexstar outbid Apollo Global Management LLC, a private equity firm, with an all-cash offer that values Tribune at around $46.50 per share.

Nexstar’s acquisition would come just three months after Tribune’s $3.9 billion deal to sell itself to Sinclair Broadcast Group Inc, a U.S. television station operator, collapsed over regulatory hurdles.

Previously, Nexstar Media acquired LKQD Technologies, a U.S. infrastructure as a service technology company, for approximately $90 million cash.