By Drew FitzGerald and Joshua Jamerson

CenturyLink Inc. on Monday said 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.

Level 3 runs one of the largest internet backbones in the world but has turned its focus to small and midsize business customers to reverse slowing sales growth in its core operations. CenturyLink, traditionally a rural phone company, 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.

"The financial benefits speak for themselves," Level 3 Chief Executive Jeff Storey said Monday during a conference call with analysts, pointing to nearly $1 billion of expected cost savings from sharing data lines and cutting overlapping jobs. "I believe scale matters."

The deal would turn CenturyLink -- which has grown from a small Louisiana phone provider by scooping up the former Qwest and Sprint Corp.'s landlines -- into an even more corporate-focused service provider, with about three quarters of its revenue coming from business customers. The combined company would also keep millions of home internet subscribers, most of whom use slower digital subscriber lines.

CenturyLink CEO Glen Post said the company had no plans to spin off its residential business. "That certainly is an option for us, but not an objective," he said.

Level 3 will help trim CenturyLink's tax billby adding nearly $10 billion of accumulated net operating losses to its balance sheet. Level 3 racked up massive losses for most of its history, as heavy infrastructure costs outstripped its service revenues. The newly profitable carrier has more recently used those past losses to reduce its effective tax rate.

The cash-and-stock deal initially valued Level 3 at roughly $25 billion, or $69.92, based on closing prices Friday, offering a premium of 49% based on the stocks' closing prices Wednesday, before The Wall Street Journal reported the companies were in advanced talks.

Shares of CenturyLink fell 12% on the news in Monday afternoon trading, lowering the deal's value to about $23 billion. Level 3, meanwhile, gained 5%. The deal would add about $11 billion in long-term debt to CenturyLink's roughly $18 billion in debt.

Under the deal's terms, CenturyLink agreed to swap $26.50 in cash and 1.4286 shares 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.

Mr. Post, a 64-year-old who has led CenturyLink since 1992, will serve as CEO of the combined company, and Level 3's chief financial officer, Sunit Patel, will serve as financial chief. CenturyLink agreed to add four of Level 3's directors to its board at closing.

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

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

CenturyLink, formerly called CenturyTel, bought Qwest Communications International for $11 billion and Savvis Inc. for $2 billion in 2011. It also purchased Embarq Corp., Sprint's former landline operations, for about $6 billion.

Another potentially disruptive regulation is headed CenturyLink's way later this year. The Federal Communications Commission in May floated new "business data services" rules that could cut the fees incumbent telephone companies can charge rivals by as much as 19%.

CenturyLink opposes the proposed rate changes and on Monday sent the agency a letter criticizing its transparency. "This drastic rate cut would cripple many providers' ability to continue providing quality service, much less have money left to invest in broadband innovation for the future," the letter said.

Level 3 has railed against legacy telephone companies like Verizon and CenturyLink for allegedly overcharging it for access. Level 3 built its network on fiber-optic cables strung between big data centers and downtown business districts, and it relies on local telephone companies to provide the last link to its customers in shops and office buildings not yet hooked up to its backbone.

Mr. Post said the looming FCC decision didn't drive the acquisition, though the broader regulatory environment played into both companies' decision. He said he expects that regulators will put tough demands on the carriers but will ultimately approve a deal that allows more competitive prices.

The merger partners also reported third-quarter earnings on Monday. CenturyLink reported a profit of $152 million as its revenue fell 3.8% to $4.38 billion. Level 3 posted a $143 million profit on revenue that was flat at $2.03 billion.

Write to Drew FitzGerald at andrew.fitzgerald@wsj.com and Joshua Jamerson at joshua.jamerson@wsj.com

(END) Dow Jones Newswires

October 31, 2016 12:42 ET (16:42 GMT)

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