Tyler Perry has just signed a huge deal with Viacom.

According to Deadline, Perry has signed a long-term deal with includes television, film and short-form video.

Similar to the current deal Perry has with the Oprah Winfrey Network (where he gave the network its first hits with shows like like The Haves And Have Nots, Love Thy Neighbor and For Better Or Worse) he will “produce approximately 90 episodes annually of original drama and comedy series” for BET and other Viacom networks. In addition, Paramount will have first-flook rights on Perry’s film projects. For films, he previously had a first-look deal for nine years at Lionsgate. Currently, several of Perry’s shows air on BET in syndication.

The film part of the agreement will begin immediately while the TV/short-form video one will begin once his OWN pact ends in May 2019. Both parts of the Viacom deal will go through 2024. In a statement, OWN said “At the end of the exclusive relationship, OWN and Tyler Perry have the option to work together on a non-exclusive basis. OWN has had great success in the scripted space with Tyler Perry and with its new original dramas Queen Sugar and Greenleaf. The network will continue to aggressively expand its roster of premium original scripted series.”

“Viacom has a rich tradition of reaching my audience through their TV, film and digital platforms and I am excited to partner with them. I am eager to have one home where I can leverage all of their assets to tell my stories to an even wider audience. I have been very blessed to have worked with the incredible people at Lionsgate and OWN over the last few years and I look forward to continuing my work with them on a non-exclusive basis,” said Perry.

BET chairman and CEO Debra Lee said, “I am delighted that we are deepening our longstanding relationship with Tyler. BET co-funded Tyler’s very first feature film, we’ve aired his movies and many of his series with great success on our networks, and we’ve honored his tremendous talent with our signature awards. This partnership will allow us to work even more closely with him and bring more of his iconic content to our viewers.”