By Joshua Jamerson

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 5% to $56.77 in morning trading in New York, while shares of CenturyLink dropped 9.4% to 27.52.

Level 3 runsone 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, and is expected to close by the third quarter of 2017.

CenturyLink Chief Executive Glen Post will lead the combined company, and Level 3's chief financial officer, Sunit Patel, will serve as financial chief of the combinedfirm.

The chairman of CenturyLink's board at the time of the closing will continue to serve as chairman of the combined company. CenturyLink has agreed to appoint four Level 3 board members at closing.

The combined company will be based in Monroe, La., and will maintain a significant presence in Colorado and the Denver metropolitan area.

Both companies also reported third-quarter earnings on Monday.

CenturyLink's earnings fell to $152 million from $205 million. Excluding items, the company had earnings of $305 million, or 56 cents a share, within its guidance for per-share profit between 52 cents and 57 cents. Meanwhile, revenue fell 3.8% to $4.38 billion.

For the fourth quarter, the company said it expects revenue to continue to be weighed by declines in its legacy business. The so-called wireline business of running telephone and internet lines has suffered from brutal competition over the past 15 years, hurt byplummeting prices for network bandwidth and high capital costs.

Level 3 reported earnings of $143 million, or 39 cents a share, up from $1 million a year ago, which was hurt by the deconsolidation of the company's Venezuelan operations.

Revenue was $2.03 billion, compared with its adjusted revenue of $2.04 billion, which excludes results from Venezuela. Level 3 reiterated its 2016 outlook.

Both companies have historically been acquisitive. In 2014, Level 3 bought TW Telecom for about $6 billion. In 2011, it bought rival Global Crossing Ltd. for roughly $2 billion.

CenturyLink, formerly called CenturyTel, also has been a voracious acquirer. In 2011, it bought Qwest Communications International for $11 billion and Savvis Inc. for about $2 billion, two years after it purchased Embarq Corp. for about $6 billion.

Citigroup acted as financial adviser to Level 3, and Lazard provided a fairness opinion. Bank of America andMorgan Stanley advised CenturyLink. Evercore provided CenturyLink with a fairness opinion. Credit Suisse acted as financial adviser to ST Telemedia, which holds 18% of Level 3's shares outstanding.

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

(END) Dow Jones Newswires

October 31, 2016 10:13 ET (14:13 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.