Former MI5 chief Dame Stella Rimington has spoken about her move from spying to fiction-writing at the Edinburgh International Book Festival.
Stella Rimington retired from the Security Service eight years ago
In 2001, Dame Stella notoriously published her memoirs about her years working at the Security Service.
Her first novel, about a female MI5 agent facing danger hunting down a terrorist cell, was published in June.
Almost 600 people snapped up tickets in advance to hear Dame Stella's talk in Charlotte Square on Tuesday.
Dame Stella has admitted the heroine in her novel - called At Risk - is partly autobiographical.
She said the book was vetted for classified information.
"At Risk was read, yes, but that's the undertaking I have if I want to write anything," said Dame Stella.
"I think it goes on forever actually - you never really retire from my kind of job.
"I didn't censor myself when I was writing it, as it's been over eight years since I left that world and I don't think anybody in their right mind would think that I have a head full of current secrets."
Meanwhile, a film by Hong Kong film-maker Wong Kar-Wai's will not close the Edinburgh International Film Festival as planned.
The film, called 2046, would not be finished in time for the close of the festival on 29 August, organisers said.
Festival artistic director Shane Danielsen said: "Obviously it's disappointing, but it's not entirely unforeseen.
"Ultimately, this is just one of the pitfalls of working with eccentric artistic geniuses."
Wong, 46, who won critical acclaim for his previous films, including Happy Together and Chungking Express, works without scripts and edits until the last possible moment.
Rescheduled to close the festival is Untold Scandal, a remake of Dangerous Liaisons by South Korean director E J-Yong.