Cable companies Comcast Corp. and Charter Communications have agreed to a $20-billion deal that would exchange subscribers in numerous markets, including Los Angeles, should Comcast prevail in its bid to acquire Time Warner Cable.

Nearly 280,000 homes in Los Angeles that currently receive their cable service from Charter would be affected by provisions of the deal unveiled Monday.

Those Charter subscribers, in such cities as Long Beach, Malibu, Burbank, Glendale and Alhambra, would eventually become Comcast customers -- perhaps as early as next year.

PHOTOS: Faces to watch 2014 | Digital media

Much must happen before that time. Comcast must first receive approval to take over Time Warner Cable in a $45-billion deal announced in February.

The Charter-Comcast deal, announced by the two companies early Monday, would unfold in three separate steps.

The first phase of the deal would have Comcast selling to Charter 1.4 million subscribers that currently receive their service from Time Warner Cable. Charter would pay Comcast cash for those subscribers.

Charter would pick up Time Warner Cable customers in Ohio, Wisconsin, Kentucky, Indiana and parts of Alabama.

Charter has said that it needs to get bigger to better compete in a fast-evolving industry that requires huge capital investments to maintain systems and roll out new features and technologies.

The acquisition would allow Charter, which currently has about 4.4 million customers, to become the nation's second-largest cable provider, with nearly 5.7 million subscribers. 

Charter initially tried to purchase all of Time Warner Cable last year but was rebuffed in its efforts. Earlier this year, Charter attempted to recruit Comcast to help it buy Time Warner Cable but Comcast turned around and separately struck its own agreement with Time Warner Cable -- seemingly leaving Charter in the dust.

ON LOCATION: Where the cameras roll

Monday's deal appears to be something of a consolation prize for Charter.

“The transactions announced today will provide Charter with greater scale, growth opportunities and improved geographical rationalization of our cable systems, which in turn will drive value for shareholders and more effective customer service," Charter Chief Executive Thomas Rutledge said in a statement.

The deal, which was approved over the weekend by the boards of both Comcast and Charter, must be approved by the Federal Communications Commission and others. Charter shareholders must approve the deal.

The deal is contingent on Comcast receiving the required regulatory approvals that it needs to take over Time Warner Cable.

That means the system hand-overs would not occur until the end of this year, or early next year, when Comcast is expected to close on its Time Warner Cable transaction.

To help win approval of an acquisition of Time Warner Cable, Comcast has said it would shed about 3 million subscribers. The Philadelphia-based company is trying to allay concerns that the consolidation would make Comcast too big and powerful.

Comcast currently has 22 million cable subscribers, and Time Warner Cable has nearly 11 million cable TV subscribers.  The deal announced Monday would allow Comcast to keep its footprint at about 30 million customers.

The second phase of Monday's complicated transaction would involve the Charter customers in Los Angeles.