Zac Efron said he had to be careful playing Ted Bundy in an upcoming film for his “own safety”.

Efron, 31, plays the serial killer in Extremely Wicked, Shockingly Evil And Vile, a film based on the memories of Bundy’s former girlfriend.

The biopic explores Elizabeth Kloepfer’s relationship with Bundy – one of the most notorious murderers in US history – as she struggles to accept her boyfriend’s crimes.

He confessed to 30 killings and was executed by electric chair in Florida in 1989.

Speaking at the European premiere in London, Efron told the Press Association: “You have to be careful for your own emotions, your own safety.

“This is a movie that I didn’t go too method, I was able to compartmentalise myself and leave him on set, in the jail cell – most days.”

Director Joe Berlinger also directed Netflix’s four-part documentary series Conversations With A Killer: The Ted Bundy Tapes.

Berlinger said Efron was his first choice to play Bundy, which the High School Musical star called “a compliment and also kind of weird”.

Zac Efron
Zac Efron was the director’s first choice for the role (PA)

The director said: “He was the only person I went to, the first person I went to.

“He took a little bit of cajoling, but he eventually agreed because he saw that the mission of the movie was not just a serial killer movie but because we really wanted to say something.”

Asked if he thought his two projects have given notoriety to Bundy, Berlinger said: “A lot of people don’t know the Bundy story.

“I don’t think we’re glamorising because by the end of these projects, you see him for what he is – a vile, extremely wicked human being.”

The biographical drama sees Lily Collins as Kloepfer, who the actress said she visited to get into the role, even looking at love letters signed by Bundy.

Collins added that during the visit Kloepfer told her secrets about Bundy, only some of which made it on screen.

Lily Collins  on the red carpet
Lily Collins also stars in the film (PA)

The film also stars Jim Parsons, John Malkovich and Kaya Scodelario, who plays Bundy’s wife Carole Ann Boone.

Extremely Wicked, Shockingly Evil And Vile will be released on Netflix and in Sky Cinemas on May 3.