James McAvoy has claimed modern society draws comfort from superheroes in a way people once did with gods.

Speaking at the London premiere of his new film, Glass, the actor said society’s need for gods fuels the popularity of superheroes, and that there is a comforting appeal in these non-religious higher powers.

McAvoy says the superhero genre has its roots in ancient religion, and that the need for transcendent beings translates into box office demand.

“We’ve always been into a higher power, a greater power,” he said.

“While we’re not looking at superheroes as a religious figure, somebody to believe in as a god, I think belief in them is comforting.”

Glass, directed by M Night Shyamalan, pits Bruce Willis’s guardian figure against Samuel L Jackson’s deviously intelligent Mr Glass.

Bruce Willis (left), Samuel L Jackson, and James McAvoy
Bruce Willis (left), Samuel L Jackson, and James McAvoy (PA)

McAvoy plays a man endowed with superhuman abilities and 24 different personalities, a character he previously played in Shyamalan’s 2016 film, Split.

In the same way good duels evil, or human failing, in the film, McAvoy believes past societies have played out their imaginary moral battles in myths.

He said: “We’ve been into that kind of figure since the time of the Norse gods, the Greek gods, the Egyptian gods, the Roman gods.

“They were all crazy dudes flying about with superpowers.

“They were all sleeping with people, making mistakes, being fallible, being more human I suppose than the latter day gods that we now believe in.”

Together with 2000’s Unbreakable, Split and Glass form the the Eastrail 177 trilogy.

Glass in released in the UK on January 18.