“The Haunting of Hill House” and “Midnight Mass” creator Mike Flanagan and his producing partner Trevor Macy have acquired the rights to adapt Stephen King’s “The Dark Tower” into a TV series.

Flanagan and Macy revealed the news Thursday in an interview with Deadline, which dove more into the pair’s recent decision to move their Intrepid Pictures’ overall deal from Netflix to Amazon.

“Predating our deal with Amazon, we acquired the rights to ‘The Dark Tower,’ which if you know anything about me, you know it has been my Holy Grail of a project for most of my life,” Flanagan said. “We actually have those rights carved out of our Amazon deal, which doesn’t mean that they can’t or won’t get behind it at some point — you don’t know. But that’s something we’ve been developing ourselves and are really passionate about finally getting it up on its feet at some point.”

Amazon previously had the rights to “The Dark Tower” themselves and were working on a project that only made it to the pilot phase. Those rights lapsed and Flanagan and Macy picked them up before setting their new pact with Amazon, which was announced Dec. 1.

Variety has confirmed that the “Dark Tower” project was carved out of Flanagan and Macy’s new deal at Amazon, though sources say that doesn’t necessarily mean the series won’t end up on Prime Video — just that others do have a shot at it, as well.

Flanagan says he envisions his adaptation of “The Dark Tower,” for which he’s already written a pilot script, as a five-season show, with two standalone feature films as followups. And yes, he has spoken with King himself about plans for the adaptation, which is far from the first time Hollywood has tried to bring this King work to the screen, the most recent being the 2017 film starring Idris Elba and Matthew McConaughey.

“This happened because I sent him a very, very detailed outline of what I wanted to do with it,” Flanagan said. “And it was in response to that, that he gave us the rights. A project like this, I wouldn’t want to be involved in it at all If we were taking it in a direction that was going to be blasphemous to the Stephen King material, but he’s been very, very supportive and very excited about what we’d like to do with it.”

Intrepid was previously under an overall deal at Netflix. While there, the company put out multiple hit shows in the horror genre, including both “The Haunting of Hill House” and “The Haunting of Bly Manor,” as well as “Midnight Mass” and “The Midnight Club.” Flanagan was the creator of the first three of the aforementioned series and the co-creator of the fourth. Macy executive produced them all.

Flanagan and Macy still have at least one project coming out at Netflix — the limited series “The Fall of the House of Usher.” That series will be a modern re-telling of the titular Edgar Allan Poe story while also drawing on other Poe works. At the time of this publishing it does not yet have a premiere date.

Intrepid has also produced a number of feature films. Those include “Doctor Sleep,” a followup to King’s “The Shining” and based on King’s book of the same name. Others include “Hush,” “Before I Wake” and “Gerald’s Game.” Flanagan directed and either wrote or co-wrote all of those films with Macy producing.