Johannes walks across the grass to a Munich research institute on his first day in the lab. A woman approaches him. She is from the secret service and she wants him to spy on a fellow postdoc, Farid, a French citizen of Algerian origin, vaguely suspected of being a sleeper terrorist. Disgusted, Johannes refuses.

In Benjamin Heisenberg's first feature film, a molecular biologist (left) informs on his colleague (centre, left) to a woman from the secret service, with chilling consequences. Credit: OLAF UNIV./COOP99 /JUICY FILM

Johannes reports to his new boss, virologist Professor Behringer, who introduces him to Farid. Behringer, an authoritarian department head, wants the two young scientists to work on the same problem in molecular biology from different angles. Farid's approach is genomics, while Johannes is studying proteins.

Through work, Farid and Johannes become friends — of sorts. And therein lies a tale of trust, ambition and betrayal. By the end of Schläfer (Sleeper), a many-layered and earnest film selected for the 2005 Cannes film festival and now playing in European cinemas, Johannes will have informed on Farid. In doing so, he will have benefited his own career and may have won the girl.

I realized how similar the procedures of film-making are to doing a research project. Katerina zu Eulenburg

Critics have praised this award-winning first feature by a graduate of the Munich Film School. As an art-house film addressing big moral issues, it will not be to everyone's taste. But for an audience of scientists, three things will be remarkable.

First, that the director chose to set a study of post-9/11 paranoia in a molecular-biology laboratory. Second, that the laboratory setting, and the interactions between the scientists, are unusually realistic — even though the plot itself has nothing to do with science. And third, that the director is the grandson of Werner Heisenberg, 1932 Nobel laureate and originator of the uncertainty principle in quantum mechanics.

Benjamin Heisenberg was born in 1974, about a year before his grandfather died, but he is keenly aware of his forebear's legacy. The German physicist was criticized for working for the Nazi nuclear programme during the Second World War. But Benjamin suspends judgement on Werner's decision to stay in Germany, asking: “How can anyone ever be sure that things turn out the way they expect and want, and that other generations won't judge their decisions differently?”

Werner was not the only high-achiever in the family. Benjamin's father Martin, a professor at the University of Würzburg, is one of the most highly cited behavioural scientists in Germany. His maternal grandmother was sister to Carl Friedrich von Weizsäcker, physicist turned philosopher, best known for his theories of the nuclear processes inside stars, and to Richard von Weizsäcker, the popular former German president. Two of his brothers studied sciences. But Benjamin's interests took him to art school, where his interest in film awakened.

Film school was disappointingly superficial. “The philosophy of the school was to learn craft, not art,” he says, recalling the scepticism some teachers had of his earlier short films. “Their film history started with Terminator II and they told me ‘oh no, don't do art, no one will watch it; it's just a mindfuck’.” He laughs at his own audacity and earnestness.

The idea for Schläfer came to Heisenberg shortly after 11 September 2001. “I saw that domestic security was being tightened and that no one was objecting,” he says. “There would have been mass demos if politicians had tried to pass even a part of the new security laws ten years ago.” Fear, he noted, was changing people's politics. It led him to wonder: how do fear and politics affect personal lives and relationships? How much does it take to weaken someone's moral convictions?

My portrayal of a pushy lab comes from what other scientists tell me exists. Benjamin Heisenberg

Growing up among scientists, Benjamin knew that the scientific environment had the dramatic potential for examining these questions. Scientists are dedicated, driven and sometimes ruthlessly competitive. Scientific conflicts could illustrate how much pressure — or how little — it takes to break a person's ethical spine. The international nature of science was also important to the plot, because an Arabic researcher would not be so unusual. Benjamin created a potentially explosive, but plausible, mix of characters: a ruthlessly ambitious principal investigator; and two equally ambitious, inexperienced young researchers who collaborate, yet compete with each other.

Two events test their friendship and collegiality. First, they fall in love with the same girl, Beate. When she chooses Farid, Johannes makes contact with the secret service agent he had previously spurned. But when Farid turns moody on Beate — he has learnt that he is being watched, but doesn't know by whom — she takes temporary comfort with Johannes. Uplifted by his romantic triumph, Johannes tells the secret service he will no longer speak with them.

Benjamin Heisenberg's film Sleeper asks what it takes to weaken a person's moral convictions. Credit: A. ABBOTT

Then a lab drama sets things on their final, fateful course. One day Farid barges excitedly into Johannes' lab: “Nature has said ‘yes’!” Suppressing his annoyance that he didn't know a paper had been submitted, Johannes is thrilled. He had, after all, helped Farid's project by reanalysing his sequence data and identifying two overlooked genes that were key to solving their biological puzzle. They celebrate. But then he learns that the manipulative Behringer has excluded him from the author list. His rage is ignited, with chilling consequences for Farid. After Farid is arrested for suspected involvement in a failed Munich bombing, Behringer replaces Farid's name with Johannes' on the Nature paper.

When Johannes decides to spy on his colleague, he crosses an ethical line. Credit: OLAF UNIV./COOP99 /JUICY FILM

We are never told the details of the research project. “People would stop listening — they only need to know enough to understand why a conflict has developed, and glimpse its complexity,” says Benjamin. But any milieu has to be convincing to make viewers believe in the film. This is why Benjamin took pains to ensure the science throughout was as real as possible.

Enter Katarina zu Eulenburg, Benjamin's cousin, and an immunology PhD student at Berlin's Humboldt University. She read the script and hosted the actors in her lab, teaching them how to pipette liquids and handle animals. She was on set, ensuring that in each lab scene the actors and extras were working appropriately. She even provided her gloved hands for close-ups of detailed procedures. “It was such fun — and I realized how similar the procedures of film-making are to doing a research project,” she says. “It is hard and disciplined work which you really have to believe in, because it takes such a long time to get the idea, write the script, find the financing and then make the film.”

Her and Benjamin's efforts were rewarded when Schläfer won the 2005 Midas Prize for the best European drama featuring science. But after seeing the film, Martin Heisenberg told his son that no one — not even a scientist as ruthless as Behringer — can swap names on a paper already accepted by Nature. But Benjamin didn't reshoot. “The dramatic moment was too important to the plot, and I was sure that one incorrect detail would not disturb the realism of the lab scenes.”

His father suspects he was the source of Benjamin's view of the importance of a Nature paper, something he finds a little embarrassing: “I always tell my students that these things shouldn't matter so much.” And Benjamin says he himself has only experienced labs with very positive atmospheres. “My portrayal of a pushy lab, whose competitive atmosphere became poisonous, comes from what other scientists tell me exists.”

In Schläfer, this poisonous atmosphere leads Johannes to betray Farid, a decision we condemn but understand. His betrayal is foreshadowed by a scene in which Johannes kills a lab mouse. “We see a parallel in Johannes' ability to coldly kill an animal, even though we know from other scenes that he is a caring and sensitive person,” says Benjamin. “Killing an animal for the greater good of science requires a decision to cross an ethical border — and then you just do it without thinking about the ethics every day.” Benjamin imagines something similar must happen when someone decides to spy for the secret service.

Would the German secret service really recruit scientists in a public research lab? It's not out of the question, says Martin Heisenberg, who witnessed an east German spy in his former lab at the institute for virology at the University of Tübingen before German reunification. “He regularly went through notebooks and transmitted information.”

Alexander Kekulé, a microbiologist at the University of Halle, Germany, says that spying on a suspected terrorist in a German lab today is entirely conceivable. “There have been recent scandals in Germany about the BND [secret service] getting journalists to spy on their colleagues — there would be even fewer scruples in spying in other professions, including science.”

With Schläfer, Benjamin says he has got the big moral issues out of his system, at least temporarily. His next film is about a bank robber in Vienna.

But he knows he will come back to science in the future. “Mostly science in films is characterized by the classical mad professor, or someone running around saying ‘Oh my God! The organ emulator is running at 400%!’ — with no one having a clue what that could mean.” But film-makers are becoming much more aware of the dramatic possibilities of science, he says: “The time of science in films is coming.”