The month-long blackout of CBS (CBS) on Time Warner Cable (TWC) systems ended late Monday when the two companies agreed on how much the cable provider will pay CBS for its programming.

The dispute was widely expected to be resolved before the start of the NFL season, which accounts for the highest-rated programs on television. CBS coverage of NFL football kicks off on Sunday.

Terms of the agreement, which also covers Showtime, Smithsonian and CBS Sports Network, weren’t disclosed.

“We’re pleased to be able to restore CBS programming for our customers, and appreciate their patience and loyalty throughout the dispute,” Time Warner Cable CEO Glenn Britt said in a statement. “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.”

CBS chief Les Moonves wrote a memo to employees, noting the “final agreements with Time Warner Cable deliver to us all the value and terms that we sought in these discussions.”

“This was a far more protracted dispute than anyone at CBS anticipated, but in spite of the pain it caused to all of us, and most importantly the inconvenience to our viewers who were affected, it was an important one, and one worth pursuing to a satisfactory conclusion,” Moonves wrote.

About 3.5 million Time Warner Cable subscribers in some major markets, including New York, Dallas and Los Angeles, were affected by the blackout, one of the longest disputes over retransmission fees.

In a research note sent to clients, Macquarie Research said a survey it conducted indicated that only 40% of Time Warner Cable customers considered switching providers. As a result, the firm estimates that only about 70,000 subscribers in the affected markets are at risk of leaving Time Warner Cable.

The major point of contention appeared to be digital rights. CBS accused the cable company of trying to impede the network’s ability to sign lucrative deals with new entrants, like Intel (INTC), that are eyeing TV services over the Internet. Time Warner Cable said it was trying to maintain rights it already held, including rights to any programming CBS licensed to online video outlets like Netflix (NFLX).

Moonves added in his memo to employees that under the agreement, CBS will “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.”

The two sides didn’t specify what kind of digital rights were part of the new deal. However, Time Warner Cable did get the rights to a Showtime Anytime app that allows cable subscribers to access programming on mobile devices.

Shares of Time Warner Cable were up 1.7% at $109.20 in early morning trading Tuesday. CBS jumped nearly 4% to $53.13.

Follow Matthew Rocco on Twitter @MatthewRocco