Leonardo Dicaprio was being eyed to play Riddler in 'The Dark Knight Rises'.

Studio executives were keen for Riddler to be the primary villain in the 2012 superhero movie, however, director Christopher Nolan decided on Bane (Tom Hardy) instead.

David S. Goyer - who co-wrote the 'Dark Knight' trilogy with Nolan - has revealed that the Oscar winner was the actor wanted to portray the supervillain.

Appearing on the 'Happy Sad Confused' podcast, he spilled: "We had all these pitches…I remember at The Dark Knight [premiere], the head of Warner Bros said, ‘You gotta do the Riddler. Leo [DiCaprio] as the Riddler.’ That’s not the way we work – not to take anything away from him.”

Goyer also revealed that Jake Gyllenhaal was considered for the role of Batman.

He said: “We would chat about all sorts of things…There were a number of people who had screen-tested, and I had advocated for Gyllenhaal. I mean, Gyllenhaal is amazing, Christian Bale is amazing, so who knows what.”

Nolan previously revealed that he approached the late Heath Ledger to take on the role of Bruce Wayne in his 'Batman' movies.

The actor would go on to win the Best Supporting Actor Oscar for his portrayal of the Joker in 2008's 'The Dark Knight'.

However, he was earlier invited by Nolan to play the Caped Crusader in 2005's 'Batman Begins' - but rejected the offer.

Speaking to The Playlist, the director said: "He was quite gracious about it, but he said, 'I would never take a part in a superhero film'.

"I explained to him what I wanted to do with Batman Begins and I think maybe he felt I achieved it."