Canadian director David Cronenberg's latest movie "A Dangerous Method" explores the role a little-known Russian woman played in the birth of psychoanalysis at the turn of the 20th century.
Between the recognized titans of the discipline Sigmund Freud and Carl Jung, played respectively by Viggo Mortensen and Michael Fassbender, came Sabina Spielrein, portrayed by Keira Knightley.
The psychologically troubled, fiercely intelligent young woman was a real-life patient first of Jung and later Freud.
Some historians also believe she had an affair with Jung, and in the film he sets out on a path of sexual liberation and obsession with his charge prompted by the debauched and dangerous Otto Gross.
For Knightley, a role involving scenes of hysteria and sexual spanking was a departure from the demure, restrained characters for which she is best known.
Asked whether she enjoyed the role, she told reporters in Venice where the film has its world premiere on Friday: "It's great fun. I'm an actress so I'm obviously crazy anyway so I think I drew on that. It's fine."
Cronenberg joked that he chose his cast based on their need for treatment.
"I'd like to just say that my cast has a great need of psychoanalysis -- it was why I cast then actually.
"It was to sort of introduce them gently to the idea that they needed help, a lot of help. And you can see they're much better people. Before they were messes when I found them."
Spielrein went on to become a respected psychoanalyst in her own right, and in the film her ideas challenge both Freud and Jung to rethink their own approach.
Cronenberg said his cerebral costume drama about what he called an "intellectual menage a trois" was "very accurate."
"There's so much in the letters," said the 68-year-old director of hits like "The Fly" and "A History of Violence."
"At this era in Vienna there were maybe five to eight mail deliveries every day. It was like the internet before the internet.
"There are tonnes of letters amongst all these characters and in those letters they quote each other ... So there's a lot of material out there which is the basis for the screenplay."
Oscar-winning writer Christopher Hampton penned the script, which is based on his own play "The Talking Cure."
For Mortensen, who also starred in Cronenberg's "A History of Violence" and "Eastern Promises," the key to playing such a well-known figure as Freud was not to get too bogged down in the detail.
"In the end it's not an academic exercise, it's not a documentary movie, it's a drama that's interesting, that sometimes is funny, that sometimes is tragic, that doesn't deal with the academic issue so much."
Cronenberg said Freud's ideas were considered dangerous at a time when many people believed man was on a one-way path to enlightenment and progress.
"Freud, with psychoanalysis, said this is not true, this is a very thin veneer of so-called civilization ... and that these ... unconscious things could erupt in a very disastrous way.
"This was on the eve of the First World War, which of course ended the dream of progress and so-called European civilization."
A Dangerous Method is one of 22 movies in the main competition at this year's Venice film festival, and is due to hit U.S. theatres in November.