CBS and Time Warner Inc. have reached a deal that will allow viewers in New York, Dallas, and Los Angeles to once again watch CBS or CBS-owned channels in their homes.

These cities haven't been able to view programming from CBS-owned networks since Aug. 2. Popular shows on these networks include "NCIS," "How I Met Your Mother," "Under The Dome" and "Dexter."

According to the AP, the companies were in disagreement over how much Time Warner Inc. would pay for programming on CBS and other channels such as Showtime, CBS Sports Network, and the Smithsonian channel.

The cities are three of the country's most populous television markets. The dispute affected approximately 1.1 million New Yorkers, 1.3 million Los Angelenos, and 400,000 Dallas residents.

The television scene has been changing over the last couple of years as TV fans have found alternative ways to watch their favorite shows, including online and on internet-connected televisions.

CBS and Time Warner were pressured to reach a deal prior to the U.S. Open tennis tournament and and the start of NFL Southeastern Conference football.

Time Warner Cable CEO Glenn Britt said in a statement: "While we certainly didn’t get everything we wanted, ultimately we ended up in a much better place than when we started."

Terms of the deal were not immediately disclosed.