After years of speculation surrounding the adaptation of his “magnum opus”, The Dark Tower, Stephen King has confirmed that Idris Elba and Matthew McConaughey will play the lead roles after being strongly linked to the parts for months.

The author tweeted: “It’s official: The man in black fled across the desert and the gunslinger followed,” referring to the two main protagonists and the line which starts the epic series, which has covered eight novels as well as comics and other iterations.

It's official: The man in black fled across the desert and the gunslinger followed. #DarkTowerMovie @McConaughey @IdrisElba — Stephen King (@StephenKing) March 1, 2016

Both stars were linked to the project late last year, with McConaughey being mentioned as a strong contender for the role of Walter Padick aka the Man in Black, while in December, Idris Elba was tipped to play Roland Deschain aka the Gunslinger.

The plot will follow the lines of The Gunslinger, the 1982 novel which started the series. Nikolaj Arcel, best known for 2012’s acclaimed drama A Royal Affair, will direct the film and told Entertainment Weekly that a lot of the film takes place in the modern world, and revealed that he thought Elba was a perfect fit for the hero of the novels, the Gunslinger.

“For me, it just clicked. He’s such a formidable man,” he said. “We discussed: who is this character? What’s he about? What’s his quest? What’s his psychology? We tried to figure out if we saw the same guy. And we absolutely had all the same ideas and thoughts.”

King also alluded to the long journey it’s taken to get the books on the big screen, which had involved a failed bid by Ron Howard to adapt the series with Javier Bardem in the role of the Gunslinger.

He told the magazine: “When you think about it, I started these stories as a senior in college, sitting in a little sh-tty cabin beside the river in Maine, and finally this thing is actually in pre-production now.”

The author recently spoke about his disappointment with some adaptations of his work, saying he was impressed with Stand by Me (adapted from the short story The Body) and The Shawshank Redemption, but others – including Graveyard Shift and The Shining – weren’t so favourably received.

“I think The Shining is a beautiful film and it looks terrific and as I’ve said before, it’s like a big, beautiful Cadillac with no engine inside it … I kept my mouth shut at the time, but I didn’t care for it much,” said King.