Photo

For months, a scrappy cable upstart thought it had Time Warner Cable on the run.

With backing from a onetime king of cable, John C. Malone, the company, Charter Communications, pushed for a merger that would create a more formidable rival to the industry’s current leader, Comcast.

But the bids kept coming in “a day late and a dollar short,” according to a person involved in the negotiations. Charter’s offers, made privately, were only slightly higher than Time Warner Cable’s share price at the time.

“We didn’t know why they didn’t do a kill shot,” the person said. Charter also strained relations by talking down Time Warner Cable’s leaders even as it tried to woo them.

So when Robert D. Marcus took over as chief executive of Time Warner Cable on New Year’s Day, he sought to turn the tables.

This account of what led to Thursday’s announcement of Comcast’s $45 billion deal for Time Warner Cable is based on interviews with several people who were involved in the negotiations, who spoke on the condition they not be named.

In early January, Mr. Marcus, a former merger lawyer, quietly contacted Comcast’s chief executive, Brian L. Roberts, and suggested that the companies discuss a deal, restarting talks that had begun last year.

Yet after a few weeks of meetings, Mr. Roberts was not sold on the idea. He was also weighing an alliance with Charter, in the hope of picking up a few choice markets should it succeed in acquiring Time Warner Cable. But Comcast and Charter could not agree on how to structure a joint hostile bid.

By late January, it looked as if Comcast might not be party to any deal at all.

After Comcast reported earnings on Jan. 28, Mr. Roberts went on a roadshow to meet with his large shareholders. What he heard took him by surprise. Many of his biggest investors wanted Comcast to buy Time Warner Cable, and urged him to take on another huge deal — not a year after having completed the acquisition of the content powerhouse NBCUniversal.

Mr. Roberts returned from those meetings emboldened, and shortly before he boarded a plane to Sochi, Russia, where NBC is broadcasting the Winter Olympics, he called Mr. Marcus with a message: The deal was on.

Video

“We were not intensely engaged with Time Warner Cable until the last 10 days or so,” Mr. Roberts said in an interview on Thursday. Over the last week and a half, the chief executives and chief financial officers of the two companies put the final touches on the remarkably simple all-stock deal.

Michael J. Angelakis, Comcast’s chief financial officer, traveled by train to New York from the company’s headquarters in Philadelphia to meet with the Time Warner Cable team.

Meanwhile in Sochi, Mr. Roberts juggled calls about the deal with a dinner hosted by the International Olympic Committee and attended by President Vladimir V. Putin, as well as meetings with the 2,700 NBC staff members on the ground.

During the opening ceremony, Mr. Roberts was on the phone constantly, according to Stephen B. Burke, the head of NBCUniversal, who also worked on the deal.

“He got to see the opening ceremony, but I think he was on the phone 20 times a day while he was in Sochi,” said Mr. Burke, who was with Mr. Roberts at the Games. “When we went through security checkpoints, he was cradling his phone to his ear.”

With Mr. Roberts in a relatively balmy Sochi, the deal teams huddled in frigid New York, at the offices of the law firms Davis Polk & Wardwell, which represented Comcast, and Paul, Weiss, Rifkind, Wharton & Garrison, which represented Time Warner Cable. And while bankers from some of the biggest names on Wall Street were present, the majority of the heavy lifting was done by the companies’ C.E.O.’s and C.F.O.’s.

Mr. Roberts returned from Sochi on Sunday, and called Mr. Marcus to check in. That evening, the sides agreed on a price. Time Warner Cable investors would receive 2.875 shares of newly issued Comcast common stock for each of their shares.

Based on Comcast’s price, that amounted to about $159 a share, just shy of the $160 a share that Mr. Marcus had told Charter was the price at which he would consider a deal.

That Mr. Marcus was willing to accept an all-stock deal made the agreement possible. Despite its acquisitive streak, Comcast is fiscally conservative, and this structure would not require it to take on any new debt. And in retrospect, Time Warner Cable’s announcement of a firm price at which it would accept a takeover was a subtle message to Comcast: The company was indeed for sale.

On Monday and Tuesday, the two sides hashed out final details. Time Warner agreed to no breakup fee — unusual in a merger deal — in exchange for Comcast pledging to divest three million subscribers and extend net neutrality commitments, both viewed as olive branches to regulators.

On Tuesday, the deal teams quietly delighted when Charter nominated a full slate of directors to Time Warner Cable’s board.

“It created noise,” a person involved in the negotiations said. “We were able to do it under the cover of darkness.”

The deal teams also correctly bet that Charter would not raise its bid at the same time it nominated directors, highlighting the difference between that process and Comcast’s imminent bid.

When CNBC — a Comcast company — broke the news on Wednesday night that a deal was imminent, Charter was caught flat-footed.

Photo

In a statement early Thursday, Charter said it was always most comfortable going it alone, even after pursuing Time Warner Cable for nearly a year.

As news of the acquisition spread through the media world, the boards of both companies convened separately to approve the transaction.

Time Warner Cable’s board and management worked through a takeout dinner Wednesday at the company’s headquarters in the Time Warner Center, overlooking Central Park. After the meeting, some members of the deal team fled the snowstorm descending on the city. One took a flight to Miami, and was in Aruba by Thursday morning.

Members of Comcast’s board met with management at 30 Rock, the iconic Midtown Manhattan skyscraper it had acquired as part of its deal for NBCUniversal, while others phoned in. Among those on the phone was Ralph J. Roberts, father of Brian, who bought an existing cable company in 1963 and renamed it Comcast 45 years ago.

“It was a very special moment,” Brian Roberts said.

Though the acquisition was not expected to face resistance from shareholders of either Comcast or Time Warner Cable, it is far from a done deal.

Shares of Comcast closed down 4 percent on Thursday, slightly denting the implied price of the transaction. But market participants viewed that as natural turnover after big news, and not the kind of skittishness that would signal a loss of investor faith in the company.

On conference calls with analysts on Thursday, the companies defended the deal amid accusations that it would not get past the regulators who will scrutinize the combined company’s dominant market share.

Comcast has pledged to divest three million Time Warner Cable subscribers, and it emphasized that the two companies did not compete in any markets. Undoubtedly, Washington will take a close look nonetheless.

Charter, meanwhile, is left with few options. It may pick up some of the subscribers Comcast divests, but there are few other regional cable operators that make for enticing targets.

Mr. Malone had called for more consolidation in the cable industry. He got it, albeit not in the form he had hoped for, and his plans to return as the “king of cable” have been thwarted for now.

Approvals for the deal, should they come, will take at least nine months. During that time, Time Warner Cable will continue to operate as a stand-alone company. Mr. Marcus, however, could be chief executive for less than a year.

“On a personal level, it’s never easy to cede control of a company,” Mr. Marcus said in a call with analysts. “However, in this case it just makes too much sense.”

Comcast, meanwhile, will have nearly a year to prepare for what is likely to be the next major step in its transformation.

It was a small regional cable operator, even smaller than Charter, just 15 years ago. Today, it is the most powerful company in the American media industry, built on a series of megadeals engineered by Mr. Roberts and his father.

“Whenever my dad is asked if he ever thought Comcast would grow to this size, he likes to say that he always imagined that was possible,” Mr. Roberts said. “He jokes, of course, but it was. Only in America.”