It is not often that a person’s character is revealed in two sentences. But it is tempting to believe that is the case with Katharine Gun.

In 2003, Gun was working as a translator of Mandarin at the government intelligence agency, GCHQ, in Cheltenham. She was 27. The country, at the time, was being drummed into war by the Blair government, desperate to achieve the United Nations’ sanction for the imminent American-led invasion of Iraq. In January that year, Katharine Gun was copied into a classified memo sent to GCHQ by a senior figure in the NSA, its US equivalent. The memo was a top-secret request to monitor the private communication of UN delegates for scraps of information, personal or otherwise, that could be used to “give the US an edge” in leveraging support for the invasion. Katharine Gun leaked that memo to the Observer, in the belief that the revelation of the proposed bugging and blackmail tactics might be enough to stop the war.

The Observer published the dirty tricks memo as a front-page splash just over two weeks before the invasion. Gun owned up to the leak a few days later to save her GCHQ colleagues from a witch-hunt. She was arrested and charged with breach of the Official Secrets Act. It was in a police cell that she uttered those two sentences that now seem to define the person she was and is. Gun was asked by Special Branch officers why she had chosen to act as she had. “You work for the British government,” her interrogator said, with a sneer.

“No,” Gun replied, steadily. “I work for the British people. I do not gather intelligence so the government can lie to the British people.”

The Observer’s front page story on 2 March 2003. Photograph: The Observer

Sixteen years have passed since Katharine Gun said those words, but they still ring in the air. Her whistleblowing was not enough to change the path of history, of course, and her last-gasp act of courage was all but forgotten in the brutal “shock and awe” of war. Truth has a habit of finding a voice, however. Gun’s words will, in the coming weeks finally receive the much wider audience they deserve. A film, Official Secrets, has been made of her story. She is played, with steely English resolve, by Keira Knightley. Her performance reminds you of the sentiment of Daniel Ellsberg, the man who famously leaked the Pentagon Papers to the New York Times in 1971, revealing the full truth of American involvement in Vietnam. Ellsberg has called Katharine Gun’s action “the most important and courageous leak I have ever seen. No one else – including myself – has ever done what Gun did: tell secret truths at personal risk, before an imminent war, in time, possibly, to avert it.”

The legal case against Gun was eventually dropped by the British government in 2004, after her lawyer, Ben Emmerson QC (played in the film with fabulous charisma by Ralph Fiennes), threatened to use disclosure to put the legal basis of the war itself on trial. Gun had, of course, been forced to abandon her career in the civil service and finally, struggling for work, left Britain altogether. For the past nine years she has been living in Turkey with her Turkish husband and their 11-year-old daughter. I met her in August in Durham, when she was on a brief visit to see her father. We sat in the bar of a city centre hotel, and talked about the ancient history of 2003.

There have been other attempts to make a film over the years. One foundered for lack of funds, another strayed further from the truth than she would have liked. When Gun was approached with the idea for a script by Gavin Hood (who had recently made Eye in the Sky, the film about drone warfare, with Helen Mirren), the pair of them first talked for five days in London, getting the story straight. I ask her first if it is gratifying to finally have it out there?

Gun is a singular presence, and she answers with characteristic care, speaking slightly haltingly, weighing her words. She grew up in Taiwan, where her father had gone to teach, and her accent is hard to place. “That is a difficult question,” she says. “Before I was charged, before my name came out, my biggest worry was that I would become a known person. After the case was dropped I did some media for 24 hours and then I immediately decided to run away and hide and not pursue the story any more. The comedown after they dropped the case, and trying to recover from that, was quite stressful.”

Because it offered her both a resolution, and none?

“On the one hand I was relieved because my life wouldn’t have to be scrutinised in court. But a part of me thought: ‘Damn – we could have put the war on trial’. And the potential chink in the Official Secrets Act we had found, which could have become a defence for others, the ‘defence of necessity’ [of speaking up to save imminent danger to life], it wasn’t tested in court.”

Some of the information that would have been revealed at her trial, in particular Lord Goldsmith’s “conflicting arguments” as to the legality of the invasion, did not fully emerge until the publication of the report of the Chilcot inquiry in 2016. In its absence, Tony Blair won another election in 2005. Gun is grimly amused to see his current return to the moral high ground over Brexit.

How many times has she seen the film now?

“I have sat through it once.”

What kind of experience was that?

Keira Knightley as Katharine Gun in the film Official Secrets. Photograph: Courtesy of Sundance Institute

“I watched it in San Francisco, at the premiere, and my friend from childhood who lived there was with me. It was weird. It was like watching a case that was very similar to my own. There is a sense of, ‘Did it really happen?’ ‘Is that really me?’”

Presumably the events mark a before and after in her life. Did everything change?

“Yes and no. My GCHQ career obviously came to an end. Certain friends did not want to see me any more, or be seen with me – some people get very paranoid. But my closest friends stuck by me.”

Does she tell her story when she meets new people?

“Never.”

How did she go about rebuilding her life?

“It was very difficult initially. Just trying to figure out what to do next. I was very concerned about joining any kind of organisation like Stop the War, and being used as a focal point or something. I didn’t want to be that. So I tried to look for work. I took up teaching. I was teaching Mandarin in the local college in Cheltenham. I ended up, bizarrely, teaching a couple of my former colleagues at GCHQ. In the very typical British manner, we just pretended we had never met.”

The side of that history that Gun didn’t really know in its fullest detail until she worked on the film was the drama of how the story made it into the pages of the Observer. The second act of the movie is concerned with the internal newspaper politics of that decision. At the time, as I well remember, the paper was split in response to the talk of war. The official editorial line, led by the then editor Roger Alton (now an executive editor at the Daily Mail) and political editor Kamal Ahmed (now editorial director of BBC News) was in close support of the Blair government’s position on the invasion. Much of the news desk was opposed.

Katharine Gun outside the Old Bailey after charges had been dropped against her, 2004. Photograph: David Sillitoe/The Guardian

Gun had given a copy of the memo, with no supporting verification, to a friend of a friend who eventually brought it to the Observer’s investigative reporter Martin Bright. The film captures well the inspired and stubborn efforts of Bright (Matt Smith in the movie), and colleagues Ed Vulliamy (played with brio by Rhys Ifans) and Peter Beaumont (played by Matthew Goode), to stand the story up, based on the few details it betrayed, and to get it into the paper, despite the strong misgivings of the political desk.

Bright has also been closely involved with the film. He left the Observer not long after the events it describes and now runs the Creative Society, a charity that helps widen access to jobs in the media and the arts to candidates with non-traditional backgrounds. When Bright’s story originally landed there were concentrated efforts to rubbish it in the gung-ho parts of the media. The online Drudge Report used the fact that the reproduced NSA memo used English spelling to cast doubt on its veracity. (In fact, those “-our” and “-ise” endings had been introduced by an Observer editorial assistant, innocently following house style guidelines as she copied out the memo into the system.) The argument was then subsumed by the war.

Film-makers generally like to glamorise newspaper offices, making them All the President’s Men hothouses of high-level argument and intrigue. Director Gavin Hood resists this for the most part – though I can’t recall Martin being applauded into the office the morning after the story broke (muttered sarcasm and grudging praise was more likely the tone). As well as illuminating Gun’s story, though, the film gives what was, by any standards, one of the great scoops of recent British journalism the credit that is long overdue.

Bright’s story was news to Gun herself, to a large degree. “I hadn’t realised the extent to which Martin in particular had gone out on a limb for this at the paper. I think of journalists as being bullet-proof in a way,” she says, “but obviously not.”

She and Bright have done several question and answer sessions in the US after the film has been screened at various festivals. One question that recurs, she says, comes from audience members asking what they should do, how they should behave, in the current mendacious political climate. There is no single answer to that, she says, but Bright had the best stab at it: “The only thing you can do is do your job right, and be a good citizen.”

The Observer team in a scene from the film, with Matt Smith, front, as home affairs editor Martin Bright. Photograph: IFC Films/Allstar

“In other words,” she says, “whatever your job is, do the things that you are supposed to do. If you are a journalist, check and double-check your sources. Don’t just swallow what politicians tell you. And if you are working in government, make sure that you are really clued up about what is going on, and think very hard where your responsibility lies.”

How often does she go through that fateful weekend, where she wrestled with her conscience after seeing the memo?

“I don’t,” she says.

Did she surprise herself at the time?

“That is a tricky question,” she says. “It was in character, I think. I grew up in Taiwan, which was a military dictatorship. I heard things that stuck. My childhood friend, for example, I remember hearing her father was on a blacklist because he had been agitating for the opposition…”

So her moral certainty was rooted in those formative experiences?

“Nobody knows if whistleblowing is nurture or nature. I think most people have red lines that they won’t cross. Some people have very low tolerance of wrongdoing, whether it is fiddling expenses, or whatever. With me, it was this. I was very exercised about what was happening. And the memo was like this big red flag as soon as I saw it.”

Was she immediately frightened of the consequences?

“I was aware I was doing something I wasn’t supposed to be doing. But I felt this information was explosive, it needed to get out. I am currently reading a book about how to blow the whistle. The author advocates anonymity. But that is unbelievably difficult now especially in the digital world.”

Gun’s leak was perhaps the last example of whistleblowing that involved a red telephone box and a photocopier, rather than downloads. I wonder what she made of the scattershot download methods of Edward Snowden and Julian Assange?

“I haven’t watched the films about either of them,” she says. “Given my experience I would want to hear what happened from the horse’s mouth, I think.”

I mention those lines about working for the people rather than the government. Does she think that was a unique belief among colleagues at GCHQ?

Protesters against the invasion of Iraq, February 2003. Photograph: Ian Waldie/Getty Images

“We didn’t talk about politics much. You don’t do you? We were mostly in our mid-20s, so it was the usual stuff, who is going out with who. What I did is a very unusual thing to do, because the results are not generally good. But I wasn’t thinking about myself really. I wanted to stop bombs dropping on Iraq.”

The consequences have been damaging not just for Gun’s career. Attempts were made by the authorities to deport her husband, who grew disillusioned with Britain. They live on a smallholding, renting a house, in rural Turkey. Just occasionally Gun is invited to speak at conferences organised by the likes of accuracy.org or VIPS (the Veterans Intelligence Professionals for Sanity). “There is a small group of us,” she says. “I call them the Usual Suspects.”

She thinks, given the current state of politics, that she might start to speak out more. “I think a lot of our current issues go back to that time. The repercussions of a lot of what happened are still being felt today.”

What does she hope people will take from the film?

“That accountability is key. And that if the perpetrators in these situations get away scot-free, that has a knock-on effect. That whole period undermined the judicial process, it undermined the parliamentary process, and it undermined the media and press and the intelligence service.” We are all of us living, she believes, with the consequences of that. The simple fact is, she says: “Truth always matters at the end of the day.”

Official Secrets is released on 18 October. There is a Guardian Live preview screening with Katharine Gun, Gavin Hood and Martin Bright on 12 October. Details at membership.theguardian.com. Gun is on Monday’s episode of the Guardian podcast Today in Focus