John Wells Productions has renewed its ties to Warner Bros. Television with a rich five-year overall deal that will extend the prolific producer’s tenure at the studio to nearly 40 years.

The deal, which is said to reach into nine figures, runs through 2024 and calls for Wells’ company to develop a wide range of programs for various Warner Bros. TV imprints. Wells has been aligned with Warner Bros. since he started there as a story editor in 1986. At present JWP produces the Showtime drama “Shameless” and TNT’s “Animal Kingdom.” It has several development prospects set up at Showtime, Apple and WarnerMedia’s nascent streaming service.

Wells’ longevity at Warner Bros. is rare in the contemporary environment, especially with the level of moving and shaking in the television industry during the past few years. Wells, who delivered a once-in-a-generation hit to the studio as the showrunner of “ER” and the enduring prestige player in “The West Wing,” made a point of meeting with other suitors and considering nontraditional alternatives to a studio overall pact. But in the end Warner Bros. TV’s focus on selling shows widely across the vast expanse of networks and platforms sealed the deal.

“We did have a lot of opportunities to talk to wonderful people,” Wells told Variety. “Warners is remaining committed to selling to all of the services — that was the huge thing for me. The independence we’ve had and the feeling that you know you can take your projects anywhere — that was the big selling point.”

Warner Bros. like its rivals is gearing up for the launch of direct to consumer streaming services from its parent company, WarnerMedia. Wells said he’s convinced that the studio views WarnerMedia as another avenue for distributing shows, but it has no intention of abandoning its effort to sell to outside players. Warner Bros. may find the market for buyers tightening some as Disney, Comcast, Netflix and others focus on building up in-house production and distribution assets. But for now, it’s still a seller’s market amid the Peak TV wave.

“It’s going to become more difficult. We’re not naive about it,” Wells said. “I think everyone is watching what’s happening and seeing this maximum gold rush of shows out there. We still just want to be in the business of taking our projects to the places where they are most enthusiastic for them.”

Like other companies, Wells and his lean staff have seen a dramatic uptick in the volume of development and length of time that it takes to nurture projects. The industry movement toward short-order series and limited series means that producers need to have more irons in the fire and balance the focus on series designed to run for multiple seasons with standalone prospects.

Wells said the key is to develop and maintain relationships with writers and provide them with the infrastructure and support to allow them to focus on storytelling and execution.

“The entire operation is set up so that our writers are in this building working together,” Wells said of his Melrose Avenue offices. “We have a wonderful opportunity to take a lot of new voices that would not have had these kind of opportunities 10 or 20 years ago. We are here to support them and give them the opportunity to create and make shows.”

Among the projects JWP is shepherding is an adaptation of the 2013 Finnish movie “The Heart of a Lion,” which Wells is writing for Showtime. The adaptation revolves around a white nationalist who falls in love with a woman who has a black son and has to confront his own past. And WarnerMedia is developing “Red Bird Lane,” a psychological horror vehicle penned by Sara Gran (“Southland”).

Wells’ deal was negotiated by attorneys Tom Hansen and Don Steele of Hansen, Jacobson and JWP’s Ned Haspel. Wells noted that CAA worked on the deal until early April when the battle between the Writers Guild of America and Association with Talent Agents led to thousands of writers firing their agents.