People's ideas of beauty differ. East Germany, with all its harshness and hideousness, has always been beautiful to me. This is partly to do with personal history - the most courageous people I have ever met came from there. But it is also because the real history remained visible in the East. In West Germany, by the time I was an adult, everything was plastered over and pristine, the past put away under innocuous plaques or confined to memorial sites. But in East Berlin, the buildings of Mitte were pockmarked with gunshot holes from communist and Nazi street fights in the 1920s; the cornices and pediments of bombed buildings stuck out through the grass of the Volkspark Friedrichshain; the paint went only halfway up the buildings on my street - a promenade boulevard - because that's all the GDR TV cameras would show. East Germany was a regime built on lies, but it literally couldn't afford to cover up its past. I don't begrudge anyone their post-1989 renovations, but to my mind beauty and truth remain related.

The Lives of Others (Das Leben der Anderen) Production year: 2006 Countries: Germany, Rest of the world Cert (UK): 15 Runtime: 137 mins Directors: Florian Henckel von Donnersmarck Cast: Martina Gedeck, Sebastian Koch, Ulrich Muhe, Ulrich Tukur More on this film

Despite the discomfort of friends of mine who suffered under the regime, some of whom are refusing to see Florian Henckel von Donnersmarck's The Lives of Others, I think the film deserves its public and critical acclaim. It is a superb film, a thing of beauty. But its story is a fantasy narrative that could not have taken place (and never did) under the GDR dictatorship. The film has, then, an odd relation to historical truth, a truth that is being bitterly fought for now.

The Lives of Others is about a Stasi man, Gerd Wiesler, whose task is to find incriminating material on the writer Georg Dreyman by spying on him and his girlfriend, a famous actress. Installed in the attic of the couple's building with his surveillance equipment, Wiesler listens to their conversations, telephone calls, lovemaking. Gradually, exposed to the higher values of art and the broader thinking of his victims, his blind obedience wanes. He falls in love with the actress, and he has a change of heart: he tries to save the couple from the depredations of his own organisation. In the final scene of the film, set in the 1990s, Wiesler opens up Dreyman's new novel, titled Sonata for a Good Man. Dreyman has dedicated it to the former Stasi man "in gratitude". "That," as Günter Bormann of the Stasi File Authority said to me, "is hard to bear."

No Stasi man ever tried to save his victims, because it was impossible. (We'd know if one had, because the files are so comprehensive.) Unlike Wiesler, who runs a nearly solo surveillance operation and can withhold the results from his superior, totalitarian systems rely on thoroughgoing internal surveillance (terror) and division of tasks. The film doesn't accurately portray the way totalitarian systems work, because it needs to leave room for its hero to act humanely (something such systems are designed to prevent). It's worth looking at the reality of what the Stasi did, and the current relations between them and their victims, to get a sense of where this beautiful fiction sits over that uglier truth.

It is now 10 years since I began speaking with former resisters of the regime, and with former Stasi men, for what became my book Stasiland. At that time, seven years after the fall of the Berlin wall, shocking revelations about the regime were still emerging in the media: the surreptitious, deadly irradiation of dissidents; the imprisonment of children as punishment to their parents; the lunatic plans to invade West Berlin. The thoroughness of the regime was horrifying: it accumulated, in the 40 years of its existence, more written records than in all of German history since the Middle Ages. East Germany was run on fear and betrayal: at least one in 50 people - by CIA estimates, one in seven - were informing on their relatives, friends, neighbours and colleagues. People were horrified to discover what had happened, again, in their country; what human beings were capable of. And they were numbed by shame.

Now, it's a different story. Groups of ex-Stasi are becoming increasingly belligerent. They write articles and books, and conduct lawsuits against people who speak out against them, including against the German publisher of Stasiland (page 84, containing allegations about the activities of ex-Stasi in the 1990s, has had to be deleted from new editions). Last year, in March, a group of some 200 ex-Stasi protested with loudhailers outside Hohenschönhausen in Berlin, which was the GDR's main prison for political prisoners. It is now a memorial museum about the regime. They demanded it be shut down, and objected to the words "Communist Dictatorship" proposed for plaques in nearby streets. And they poured scorn on their former victims - some of whom now take tours through the prison. A friend told me how ex-Stasi men sometimes insinuate themselves into the tours she conducts. As she tells the story of her persecution and imprisonment, they heckle from the back, "Rubbish! Lies! You're just a common criminal!" Sensitivities among victims' groups are running understandably high. The opening shot of The Lives of Others is set at Hohenschönhausen prison, but it wasn't filmed there. Dr Hubertus Knabe, the director of the memorial, refused von Donnersmarck permission.

The publicity notes to the film claim "the greatest authenticity" and "never-before-seen accuracy", and cite many prominent historians of the GDR. It may well be the first realistic portrayal of the GDR. Earlier, kitscher films such as Sonnenallee and Goodbye Lenin! might be thought of as part of the "Ostalgie" phase of the denial of the GDR reality. They minimised the role of the Stasi.

To understand why a Wiesler could not have existed is to understand the "total" nature of totalitarianism. Knabe talks of the fierce surveillance within the Stasi of its own men, of how in a case like Dreyman's there might have been a dozen agents: everything was checked and cross-checked. This separation of duties gives some former Stasi men the impression that they were just "obeying orders", or were "small cogs" in the machine, and that therefore they couldn't have done much harm. Perhaps this is partly why repentance like Wiesler's is rare. To my mind, hoping for salvation to come from the change of heart of a perpetrator is to misunderstand the nature of bureaucratised evil - the way great harms can be inflicted in minute, "legal" steps, or in decisions by committees carried out by people "just doing their jobs".

Part of Wiesler's comeuppance is that, after the fall of the wall, he is seen distributing junk mail to people's letterboxes. The ex-Stasi are vociferous in their claims of being "victims of democracy". But the truth is that, by and large, they are doing much better in the new Germany than the people they oppressed. They have the educations and solid work histories they denied their victims. Many of them were snapped up by security firms and private detective agencies eager for their considerable expertise, or they went into business, skilled as they are - to perhaps an unholy degree - in "managing" people. Surprisingly often, they sold property and insurance, occupations unknown in the Soviet bloc. (I think they had a head start here - after all, they were schooled in the art of convincing people to do things against their better judgment.)

Knabe is no doubt correct about the internal surveillance of the Stasi making it physically impossible for a Stasi man to try to save people. But in my experience, the more frightening thing is that they didn't want to. The institutional coercion made these men into true believers; it shrank their consciences and heightened their tolerance for injustice and cruelty "for the cause".

Von Donnersmarck spent four years researching the film, and knows as well as anyone that there is no case of a Stasi man trying to save victims. He has said: "I didn't want to tell a true story as much as explore how someone might have behaved. The film is more of a basic expression of belief in humanity than an account of what actually happened." The terrible truth is that the Stasi provide no material for a "basic expression of belief in humanity". For expressions of conscience and courage, one would need to look to the resisters. It is this choice, to make a film about the change of heart of a Stasi man, that turns the film, for some, into an inappropriate - if unconscious - plea for absolution of the perpetrators.

Dr Knabe objects to "making the Stasi man into a hero". He recounts that von Donnersmarck "would not be persuaded otherwise", and notes that the director cited Schindler's List as justification for what he planned to do. "But that is exactly the difference," Knabe says. "There was a Schindler. There was no Wiesler."

The system demanded such loyalty, in fact, that most ex-Stasi are still true believers. A story such as Wiesler's plays into their hands as they fight for their reputation. "There is a kind of creeping rehabilitation going on," says Knabe. "Germany failed to prosecute communist-era crimes, except in a very few instances. This was a criminal system. But now all we're supposed to remember is the factory jobs and good day care."

Joseph Conrad wrote: "Art itself may be defined as a single-minded attempt to render the highest kind of justice to the visible universe, by bringing to light the truth, manifold and one, underlying its every aspect." But drama has its own imperatives. At the end of his "director's statement", von Donnersmarck writes: "More than anything else, The Lives of Others is a human drama about the ability of human beings to do the right thing, no matter how far they have gone down the wrong path." This is an uplifting thought. But what is more likely to save us from going down the wrong path again is recognising how human beings can be trained and forced into faceless systems of oppression, in which conscience is extinguished.

It is the way totalitarian regimes work, and how we are vulnerable to them, and how we deal afterwards with the perpetrators, that are the questions raised by the reaction to The Lives of Others. These questions in relation to the Stasi regime are still tender spots in the German psyche because of the Nazi regime that preceded it. Was a change of heart and rebellion within the ranks of the oppressors possible? If we imagine the perpetrators as good-hearted people caught in a system not of their making (ie victims of a kind), where does that leave the Jews, or the true GDR heroes, the dissidents?

The battle for the reputation of the Stasi men currently being waged in the media, the entertainment business, the courts, in personal intimidation of former victims and in demonstrations on the streets of Berlin cannot be understood without understanding that it is being waged with the Third Reich in the back of everyone's minds. The Stasi men are furiously fighting so as not to go down in history as the second lot of incontestable bogeymen thrown up by 20th-century Germany. And many Germans themselves are deeply uncomfortable about recognising the chilling inhumanity of this, the second dictatorship on their soil.

Several times on my book tour in 2004, in both former West and former East Germany, a sad and telling question was asked. At the end of the reading, after any ex-Stasi who were there had left, someone would say, "What is it about us Germans, do you think, that makes us do these things?" By "these things" they meant the totalitarian and administrative cruelties of the Nazi and the Stasi regimes. I have no answer; I do not think they are particularly German things to do. But there is such terror and tragedy in the question that I can see why a fable of forgiveness might hit the mark.

· The Lives of Others (15) is on general release. Anna Funder is the author of Stasiland (Granta)