time warner trucks
(Photo by Jonathan Fickies/Getty)

A month after Time Warner Cable rejected one takeover bid as “grossly inadequate,” the nation’s second-largest cable company has attracted a better offer from a bigger buyer.

In a transaction that was officially announced Thursday after preliminary reports broke Wednesday night, Time Warner has agreed to be purchased by Comcast, the country’s leading cable provider. The all-stock deal is valued at about $45 billion—and roughly $67 billion when assumed debt is tacked on.

New York–based Time Warner had previously rejected a $61 billion offer from Charter Communications—an investment vehicle for billionaire John Malone’s Liberty Media that is the nation’s fourth-largest cable provider—that valued the target’s shares at $132.50 apiece.

In responding to that bid, Time Warner CEO Rob Marcus said his company would only consider a Charter takeover offer if came in closer to $160 per share. Philadelphia-based Comcast wound up getting there first, reaching an agreement that values the Time Warner shares at $158.82 apiece—a 17.3 percent premium over Time Warner’s Wednesday closing price and a 19.9 percent premium over Charter’s bid.

In announcing the agreement, Comcast said the acquisition would generate roughly $1.5 billion in annual savings and increase the company’s subscriber base from 22 million to 30 million. Comcast said the deal will also improve its cloud computing offerings to businesses, while expanding its access to advertisers in certain key markets.

Under the deal’s terms, Time Warner shareholders will receive 2.875 Comcast shares for each of their Time Warner shares and, ultimately, a 23 percent ownership stake in Comcast. In order to offset price dilution resulting from the issuance of the new shares, Comcast said it plans to expand its share-buyback program by $10 billion once the Time Warner acquisition closes.

Closing—which is expected to come by the end of the year, pending the approval of regulators and both companies’ shareholders—is no certainty. To consummate the deal, the country’s two largest cable providers will need to survive what is sure to be a rigorous regulatory approvals process. Comcast apparently expects a tough path to closing, as it reportedly began seeking advice about regulators’ potential objections to a deal in November, according to Reuters.

Comcast has already moved to assuage some of those concerns by saying it plans to divest roughly 3 million Time Warner subscribers right away to bring the number of subscribers it would acquire in the deal down to 8 million. Both companies have also been quick to insist that the deal “will not harm competition or reduce consumers’ choice in any way,” because, according to Comcast, the two companies “do not currently compete to serve customers in any zip code in America.” Comcast added that the combined company’s total U.S. market share of subscribers will remain under 30 percent.

Comcast has experience guiding large, industry-shifting deals through intense regulatory scrutiny, gaining approval for its $72 billion purchase of AT&T Broadband in 2001 and for its acquisition of a 51 percent stake in NBC Universal ten years later. Comcast acquired the outstanding 49 percent stake in NBC Universal from General Electric last year.

Leading the way for Comcast in all three of those transactions was its longtime legal adviser, Davis Polk & Wardwell, and the firm is reprising that role in connection with the Time Warner deal. Joining Davis Polk on Comcast’s legal team is Willkie Farr & Gallagher, which will represent the company in seeking the Federal Communications Commission’s approval of the transaction. Willkie previously steered Comcast’s dealings with the FCC with respect to the two NBC Universal acquisitions.

The Davis Polk team advising Comcast on the Time Warner acquisition includes New York-based corporate partners David Caplan and William Chudd. Antitrust partner Arthur Burke, capital markets partner Bruce Dallas, tax partner Avishai Shachar, executive compensation partner Kyoko Takahashi Lin and intellectual property partner Frank Azzopardi are also advising. The Davis Polk associates working on the matter are Cheryl Chan, Gillian Emmett, Lee Hochbaum, Adam Perry and Christopher Utecht.

Willkie’s team, meanwhile is led by communications practice chair Francis Buono and communications partner James Casserly, both of whom are based in Washington, D.C. Communications special counsel Michael Jones and litigation partner David Murray are also advising, as are associates Mia Hayes, Michael Hurwitz, Michael Jones, Melanie Medina and Joshua Parker.

Arthur Block serves as Comcast’s general counsel.

Simpson Thacher & Bartlett also landed a role on the transaction, representing JP Morgan in its capacity as one of Comcast’s financial advisers. Corporate partner Robert Spatt is leading the Simpson Thacher team, along with associates Ariel Oxman and Allen Pan.

As it was on the Charter bid, Time Warner is being represented by a Paul, Weiss, Rifkind, Wharton & Garrison group. Robert Schumer, cohead of the firm’s M&A practice, is leading a team from the firm that also includes M&A partners Ariel Deckelbaum and Ross Fieldston. As we have previously reported, Schumer was named an American Lawyer Dealmaker of the Year in 2011 for his role advising Time Warner on its $3 billion purchase of Insight Communications.

Skadden, Arps, Slate, Meagher & Flom is also representing Time Warner in connection with its sale. The Skadden team includes New York-based M&A partners Stephen Arcano and Ann Beth Stebbins. Arcano previously advised a special committee of Time Warner Cable’s board in the company’s 2008 split from former parent Time Warner Inc.

Time Warner’s general counsel is Marc Lawrence-Apfelbaum, a former Cravath, Swaine & Moore associate. (Cravath is a frequent adviser of Time Warner Inc., taking the lead for the company on its 2008 separation from Time Warner Cable.)

As we have reported previously, Charter turned to attorneys at Wachtell, Lipton, Rosen & Katz and Kirkland & Ellis for legal advice on its Time Warner bid.