Updated

Comcast, the nation's largest cable company, will buy Time Warner Cable for $45.2 billion in stock, combining America's two biggest cable operators, The Wall Street Journal reported late Wednesday.

Under the deal expected to be announced Thursday morning, Time Warner Cable shareholders will receive $158.82 per share in stock for their shares, roughly $23 a share above where Time Warner has been trading, people familiar with the situation told the newspaper.

The deal is expected to end a takeover battle for Time Warner by Charter Communications, the nation's fourth biggest cable operator, and its biggest shareholder, Liberty Media, The Journal reported.

The price is about 17 percent above Time Warner Cable shares' Wednesday closing price of $135.31 and trumps a proposal by Charter to buy Time Warner for about $132.50 per share, or $38 billion in cash and stock.

Time Warner Cable shareholders will receive 2.57 Comcast shares for every Time Warner Cable share they own. Once the deal is final, they will end up owning about 23 percent of the combined company, one of the people familiar with the matter told The Associated Press.

Charter had pursued Time Warner Cable for months but Time Warner Cable CEO Rob Marcus had consistently rejected what he called a lowball offer, saying he'd cut a deal for $160 per share in cash and stock.

For a time, Comcast stayed in the background, waiting to purchase any chunk of subscribers that a combined Charter-Time Warner Cable would sell off. Charter had planned to finance its bid with $25 billion in new debt. As part of a plan to pay off the debt quickly, the company considered selling off some of its territories after a deal had closed. Time Warner Cable's Marcus had also balked at the huge debt burden the Charter takeover represented.

Sources told Reuters that the proposed merger would be subject to regulatory approval.and that both Comcast and TWC expect to close the transaction by the end of the year.

Instead, Comcast now plans to divest 3 million pay TV subscribers after the deal closes. With 22 million of its own pay TV customers and Time Warner Cable's 11.2 million, the combined entity will end up with about 30 million subscribers when the deal is complete, a level believed not to trigger the concern of antitrust authorities. A formal cap was dissolved years ago by regulators, but divesting subscribers could help the deal get approved more quickly.

Comcast is taking the position that because Comcast and Time Warner Cable don't serve overlapping markets, their combination won't reduce competition for consumers, especially in the face of rivals AT&T and Verizon, which compete with the cable operators to provide both pay TV services and Internet hookups. Both AT&T and Verizon are growing quickly. They ended 2013 with 5.5 million and 5.3 million pay TV subscribers, respectively.

Comcast and Time Warner Cable are expected to save $1.5 billion in annual costs over three years, with half of that realized in the first year, one of the people said.

Comcast also plans to add an additional $10 billion in share buybacks at the close of the deal, on top of a recent plan to boost its share buyback authority to $7.5 billion from $1 billion, the person said.

Conceding that it had lost the takeover battle, Charter issued a statement Wednesday saying, "Charter has always maintained that our greatest opportunity to create value for shareholders is by executing our current business plan, and that we will continue to be disciplined in this and any other (merger and acquisition) activity we pursue."

Even before the deal had been formally announced, it was being denounced. Public Knowledge, a Washington-based consumer rights group, said in a statement Wednesday that regulators must stop the deal, because it would give Comcast "unprecedented gatekeeper power in several important markets."

"An enlarged Comcast would be the bully in the schoolyard," it said.

Click here for more from The Wall Street Journal.

Click here for more from Reuters.

The Associated Press contributed to this report.