CenturyLink Inc. said Monday that it reached a cash-and-stock deal to buy Level 3 Communications Inc. for roughly $25 billion, a marriage that would give the communications companies more heft to weather a competitive landscape.

The deal, which values Level 3 at $69.92 a share as of Friday's closing prices, represents a 49% premium to the company's closing price of $46.92 on Wednesday, the day before The Wall Street Journal reported the companies were in advanced talks.

Shares of Level 3 rose 3.9% to $56.15 in premarket trading, while shares of CenturyLink were inactive.

Level 3 runs one of the largest internet backbones in the world but has turned its focus increasingly to small and midsize business in an attempt to reverse slowing sales growth in its core business. CenturyLink, traditionally a rural local-phone-service provider, has sought to upgrade its network with fiber-optic lines in a bid to compete with AT&T Inc., Verizon Communications Inc. and rivals in the cable industry.

CenturyLink gets about two-thirds of its revenue from business customers, while Level 3's comes entirely from that segment.

Under the deal's terms, CenturyLink agreed to swap $26.50 in cash and 1.4286 CenturyLink share for each share of Level 3. The company said the deal was worth $34 billion, including debt.

The companies see the deal closing by the third quarter of 2017

Write to Joshua Jamerson at joshua.jamerson@wsj.com

(END) Dow Jones Newswires

October 31, 2016 07:25 ET (11:25 GMT)

Copyright (c) 2016 DowJones & Company, Inc.