The Office” and “Parks and Recreation” reruns will continue to air on Viacom linear networks for the foreseeable future.

The company announced that it has reached a new deal with NBCUniversal to keep “The Office” on Comedy Central through 2021. The series will then air in a non-exclusive window on Viacom Media Networks through 2025. “Parks and Recreation” will continue airing on Comedy Central through 2024.

“Keeping the exclusive rights to ‘The Office’ through 2021 is a coup for Comedy Central and Viacom,” said Tanya Giles, general manager of Comedy Central, Paramount Network, and TV Land. “Since acquiring it, we’ve reinvigorated the franchise on linear, drawing big audiences throughout our full day schedule. It’s also been a key lead-in to help drive viewers to our own original, acclaimed comedies. We’re so excited to keep it on our air that we wouldn’t even trade it for an iPod.”

For Viacom, the deal was closed by Barbara Zaneri, executive vice president of Viacom Program Acquisitions Group (VPAG) for an undisclosed sum. Earlier this year VPAG acquired the exclusive cable rights to “Seinfeld.”

It was announced earlier this year that both “The Office” and “Parks and Recreation” will stream exclusively on NBCUniversal’s upcoming streaming service, Peacock. “Parks and Recreation” is set to leave Netflix and other streamers in October 2020 while “The Office” will follow suit in January 2021. The deal for the streaming rights to “The Office” is rumored to have been for $500 million, while the deal for “Parks and Recreation” is also said to be in the nine figure-range.

The news comes as more and more companies are pulling their legacy content off of streamers like Netflix in order to keep them on their own branded streaming services. For example, “Friends” and “The Big Bang Theory” will stream exclusively on HBO Max upon its launch in May 2020, while “The Simpsons” library is now available on Disney Plus.