James McAvoy is in talks to star in the forthcoming Julian Assange biopic.

The 'X-Men: First Class' actor is reportedly up for the role of the WikiLeaks founder's right-hand man Daniel Domscheit-Berg in the film opposite Benedict Cumberbatch as the controversial journalist, Variety reports.

The script for the film - which is being directed by 'Twilight Saga: Breaking Dawn' helmsman Bill Condon - is partially based on Daniel's book 'Inside WikiLeaks: My Time With Julian Assange at the World's Most Dangerous Website'.

Josh Singer's script is also partially adapted from David Leigh and Luke Harding's book 'WikiLeaks: Inside Julian Assange's War on Secrecy'.

'RoboCop' actor Joel Kinnaman was previously linked with the role of Daniel, while Jeremy Renner has expressed a wish to portray Assange.

The DreamWorks-produced film is expected to go into production next year.

Assange is wanted in Sweden to face questioning over a sexual assault investigation.

He has been living in the Ecuadorian Embassy in London since June 2012.

British officials say he will be arrested if he steps out of the building.