NEW YORK (AP) — After weeks in limbo, about 4 million of Time Warner Cable’s customers will no longer have to worry about losing one of their network TV stations.

Just hours before a midnight deadline, the company announced Saturday it has reached a deal in principle with Sinclair Broadcast Group Inc. over the fees it pays to carry Sinclair broadcast signals, including those from local affiliates of Fox, ABC and CBS.

Time Warner said it expects to complete a final deal within seven days.

Without a deal, Time Warner would have had to drop Sinclair’s stations from its channel lineups, though subscribers might not have noticed the difference. Time Warner says it would have replaced signals from Sinclair with feeds from nearby stations in other cities.

Viewers would still have seen football games and shows such as “Glee” and “Desperate Housewives.” But the local news would have come from an out-of-town station.

The two sides had extended the agreement for two weeks before the initial expiration on New Year’s Day. On Friday, they announced a 24-hour extension to midnight Saturday.

Time Warner declined to comment further on the negotiations. Sinclair could not be reached for comment.

Major stations that would have been affected include the Fox stations in Buffalo, Rochester and Syracuse, N.Y., and San Antonio, Texas, the CBS station in Portland, Maine, and the ABC station in Greensboro, N.C.

ABC and Fox stations would have been affected in Columbus and Dayton, Ohio. No NBC stations would have been affected.

Separately, Sinclair and regional cable provider Bright House Networks said Friday they had reached a tentative agreement on fees, and they extended negotiations until next Friday to work out details. Those talks cover stations reaching about 1 million Bright House customers, including ones in Florida.

Disputes over broadcast fees have flared increasingly in recent years as station owners have sought higher fees from cable TV providers. Traditionally, broadcasters relied on advertising to pay their bills. But with competition for ad dollars rising, they have sought a second source of revenue.

(Copyright 2011 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)