Media giant CBS and cable titan Time Warner Cable announced a deal Monday to end an acrimonious, monthlong financial dispute that caused CBS programming to be blacked out for more than 3 million Time Warner Cable subscribers in New York City, Dallas and Los Angeles. The blackout occurred after the two sides failed to reach an agreement on retransmission-consent fees, which cable and satellite companies pay to broadcasters for the right to carry their channels.

The dispute, which was characterized by caustic recriminations from both sides, was one of the longest blackout battles between a TV network and a cable company in recent memory. Industry analysts had predicted that the fight would end before the beginning of the NFL football season, lest the two sides incur the wrath of football fans by depriving them of pigskin programming. On Sept. 15, the New York Giants are scheduled to play the Denver Broncos in a game to be broadcast on CBS in the Big Apple.

CBS, the nation’s top-rated broadcast network, and CBS-owned channels, including Showtime, went dark for viewers in the affected Time Warner Cable markets on Aug. 2. In response, CBS blocked online access to its shows for the cable giant’s broadband Internet subscribers. CBS is home to popular programming such as The Big Bang Theory, Big Brother, NCIS and 60 Minutes. The network also broadcasts the U.S. Open tennis tournament, currently under way at Flushing Meadows in New York City.

At just after 5 p.m. E.T. on Monday, CBS and Time Warner Cable announced that they had resolved their dispute and said that CBS programming would return starting at 6 p.m. As of Monday evening, CBS had been restored to its familiar location on Channel 2 for Time Warner Cable subscribers in New York City. The two sides did not disclose the terms of agreement, but CBS had reportedly been demanding a fee increase from Time Warner Cable of about 100% per subscriber, from $1 to $2 per month. (Time Warner Cable was spun off as an independent public company from TIME’s parent, Time Warner, in 2009.)

Mignon Clyburn, acting chairwoman of the Federal Communications Commission, urged TV networks and cable companies to avoid similar blackouts in the future. “I am pleased CBS and Time Warner Cable have resolved their retransmission consent negotiations, which for too long have deprived millions of consumers of access to CBS programming,” Clyburn said in a statement. “At the end of the day, media companies should accept shared responsibility for putting their audience’s interests above other interests and do all they can to avoid these kinds of disputes in the future.”

In a memo to employees, CBS president Leslie Moonves described the dispute as “far more protracted” than the company had expected, but said it was worth pursuing to achieve a satisfactory conclusion. “The final agreements with Time Warner Cable deliver to us all the value and terms that we sought in these discussions,” Moonves said. “We are receiving fair compensation for CBS content and we also have the ability to monetize our content going forward on all the new, developing platforms that are right now transforming the way people watch television.”

Glenn Britt, CEO of Time Warner Cable, said in a statement: “We’re pleased to be able to restore CBS programming for our customers, and appreciate their patience and loyalty throughout the dispute. As in all of our negotiations, we wanted to hold down costs and retain our ability to deliver a great video experience for our customers. While we certainly didn’t get everything we wanted, ultimately we ended up in a much better place than when we started.”

Britt also took the opportunity to criticize the retransmission-consent system, which has been in place since the 1992 U.S. Cable Television Consumer Protection and Competition Act, which required cable and satellite companies to obtain permission from TV broadcasters before carrying their programming. “The rules are woefully out of date, are the primary reason cable bills are rising, and too frequently leave our customers without the programming they love,” Britt wrote. “We sincerely hope that policymakers heed that call and take action to prevent these unfortunate blackouts soon.”

Time Warner Cable customers hoping to receive a credit on their bill for the CBS blackout will be disappointed. “We already provided a preview of premium programming from Starz Kids & Family, and a free movie on demand or an Amazon gift card, and free antennas to those that chose to take them,” the cable giant said on its website. “We also provided Tennis Channel to all digital customers during the US Open. All of that has a significant retail value and we won’t be providing any additional compensation.”

Time Warner Cable did say that customers who picked up a free antenna from the company in order to watch CBS would not have to return it. “That is yours to keep,” the cable giant said.