James McAvoy said filming horror sequel It Chapter Two gave him nightmares.

The Scottish actor is starring as a grown-up member of The Losers Club, a group of children from the first movie who were terrorised by Pennywise the clown.

McAvoy, 40, revealed during filming he suffered bad dreams where the clown, played in the film by Bill Skarsgard, crawled into bed with him.

James McAvoy
Scottish actor James McAvoy says he suffered nightmares during filming of It Chapter Two (Ian West/PA)

Speaking at an event to promote the film in San Diego, McAvoy said: “I had nightmares about Pennywise quite a lot. The only one I can really remember is I’m lying on my side in the bed and he was in bed with me.

“And he’s stroking my back gently and saying, ‘wake up James, wake up’. And I was just terrified, pretending to be asleep.

“I just thought, I’ve got to pretend to be asleep, I’ve got to pretend to be asleep.

“I had lots of nightmares about Pennywise but that’s the one specific one I can remember.”

McAvoy was appearing at ScareDiego, a now annual event held on the eve of San Diego Comic-Con, the pop culture convention.

He was joined by his It co-stars Jessica Chastain, Bill Hader, Isaiah Mustafa, Jay Ryan, James Ransone and Andy Bean, as well as director Andy Muschietti, for a panel chaired by US comic Conan O’Brien.

Fans were given a first-look at a trailer for Chapter Two, which is a sequel to 2017’s It, based on Stephen King’s 1986 novel of the same name.

Glasgow-born McAvoy, who found fame starring in Channel 4 drama Shameless, said he was injured during filming, sustaining damage to both of his quadriceps and suffering pain in his knees for six months.

He said during filming for a particularly physically demanding scene, he looked to Muschietti in disbelief after he asked them to reshoot.

McAvoy said: “He’s like ‘cut, that is perfect – let’s do it again.”

It Chapter Two is set to be released in the UK on September 6.