Daniel Radcliffe distances himself further from his Harry Potter image by taking on a role that involves drugs, death and gay sex.

Premiering today at the Sundance Film Festival, Kill Your Darlings casts Radcliffe as Allen Ginsberg, American poet and one of the leading figures of the Beat generation in the 1950s.

Director John Krokidas explained that Radcliffe’s character starts as a dutiful son who spends his time taking care of others but eventually spills over with repressed passion.

‘By the end of the movie, he is a poet and a rebel’, Krokidas said. ‘I had a feeling Dan might be able to relate to this’.

Radcliffe was reportedly apprehensive about playing Ginsberg until Krokidas helped him manage the role. He said in an interview: ‘John was very helpful in furnishing me with a lot of graphic detail of what I would be experiencing at the various stages. It was something new.’

But you know what, we shot that whole scene in maybe an hour and a half so it was incredibly fast-paced. I didn’t really have time to stop to think and worry about it,’ said Radcliffe.

The film follows Ginsberg as he matriculates at Columbia and falls in love with Lucien Carr, a fellow student who was already romantically involved with an older man named David Kammerer.

Though sometimes referenced in Beat literature, the story of the love triangle, which ends in murder, has never been told in detail until now. The film follows Ginsberg and Carr’s relationship, the killing that defined it, and their friendship with Jack Keroauc and William Burroughs.

‘By the end of the movie, he is a poet and a rebel’, Krokidas said. ‘I had a feeling Dan might be able to relate to this’.