Ian McKellen will be playing the role of Sherlock Holmes in the film adaptation of Mitch Cullin's A Slight Trick of the Mind, it was announced on Thursday.

The film will be directed by Oscar winner Bill Condon (Gods and Monsters, The Fifth Estate, Twilight: Breaking Dawn). The story is being adapted by Jeffrey Hatcher (The Duchess). McKellen will portray an aging Holmes who is struggling to come to terms with the slackening of his mind and sharp wit.

The plot was described in a release for the film that was sent out today:

"In 1947, Sherlock Holmes, long retired, lives in a sleepy Sussex village with his housekeeper and her amateur -sleuthing son. But far from living out a peaceful retirement, he is haunted by an unsolved case from fifty years ago. He remembers only fragments: a confrontation with an angry husband, a secret bond with his beautiful but unstable wife.

"With his legendary mental powers on the wane. and without his old sidekick Watson, Holmes is faced with the toughest case of his life -- as case that might finally reveal to him the mysteries of the heart."

Condon's new film, the Julian Assange biopic, The Fifth Estate, will be premiering at the Toronto International Film Festival tonight. Benedict Cumberbacht portrays Assange in the film.

McKellen and Condon have worked on the critical success, Gods and Monsters (1998), before this.

The film is being co-financed and co-produced by Len Blavatnik's AI Film, and Anchor Gray Productions' Anne Carey (The American), See-Saw Films' Iain Canning and Emile Sherman (The King's Speech) and Icon/AI Film CEO Aviv Giladi will come on board as producers.

Watch a trailer of Gods and Monsters: