From the biggest spy scandal ever to hit the UK, to one of the most ambitious joint MI5 and police counter terror operations of all time, a new book makes gripping reading for any budding James Bond.Full of fascinating state secrets, The MI5 Archive: Official Secrets, presents a fascinating window into the world of spycraft that’s safeguarding British democracy.

It examines the inner workings of MI5, detailing some of the clandestine work carried out by the British Security Service, from its origins - it’s existed in different forms since 1909 - to the modern day. It scrutinises uprisings, executions, double agents and honey-trapping femmes fatales from across the globe.

Featuring never-before-published images, prepared for last year's National Archives’ exhibition, the 368-page book shines a light on MI5’s involvement in some of the biggest political events of the 20th century. These include the hunt for German spies during the First World War, the rise of Oswald Mosley and British fascism.

• Extraordinary story of hero animals who helped to win the First World War

It gives secrets of the Profumo Affair - when, in 1961, Secretary of State for War John Profumo began an affair with model Christine Keeler, who was also allegedly dating a Soviet naval attache.

Chief jet plotter Abdulla Ahmed Ali pictured in a propaganda video

And it reveals documents from the race to identify the five members of the Cambridge Spy Ring - traitors Kim Philby, Guy Burgess, Anthony Blunt, Donald Maclean and John Cairncross, who passed information to the Soviet Union at least into the 1950s. All were educated at Cambridge University and recruited by the Russians in the 1930s.

Fresh details of the hunt to identify them are laid bare in declassified files exposing the anxiety of the British state and the double agents themselves, as MI5 closed in on the moles at the heart of the establishment.

The focus of novels by John le Carré, Ian Fleming and Frederick Forsyth and TV and film adaptations such as Tinker Tailor Soldier Spy, The Imitation Game and BBC drama Cambridge Spies, papers about the traitors make for riveting reading.

A treasure trove of secrets, the book delves into the lives of everyone from German intelligence agents to fascist sympathisers and well-known individuals with links to people or organisations of interest to MI5.

High-ranking member of British intelligence and double agent Kim Philby (1912 - 1988)

Written by archivists Mark Dunton and Stephen Twigge, they gleaned information from some of the 6,000 files MI5 has released since 1997, when the Security Service first made the decision to share its early records with the National Archives, formerly called the Public Records Office.

The book also examines modern day threats faced by MI5, including the improvised mortar bomb attack, fired from a Ford Transit van parked in London’s Horse Guards Avenue on February 7, 1991 - detonated close to the garden of 10 Downing Street, then occupied by Prime Minister John Major

Stephen Twigge says: "The explosion blew open the doors of the cabinet room, where members of the government had assembled for their regular Thursday meeting. Less than seven years after the Brighton bombing, the IRA had almost succeeded in wiping out half of the British Cabinet. Yet nobody was seriously injured.”

This was thanks to laminated glass doors having recently been fitted to the Downing Street garden, as advised by the Security Service. This prevented the assembled cabinet members and senior officials being shredded by flying glass.

Preventative intelligence work, including legislation and administration before and during the First World War

No intelligence had been received prior to the attack, which triggered the decision for the Security Service to take over the primary role from Special Branch of monitoring Irish republican activity on the British mainland.

Simon says: "The new security arrangements were formally announced in Parliament in May 1992 by the Home Secretary, Kenneth Clarke, who believed that transferring lead responsibility to MI5 was essential to combatting further IRA attacks.”

But the news was overshadowed by Stella Rimington's appointment as Director General of MI5. Simon adds: “The news that the new boss was to be a woman was greeted with fascination. Some journalists described Rimington as a dowdy middle-class housewife, expressing disappointment that she did not look more like Rosa Klebb, the villain in the 1963 James Bond movie From Russia With Love."

The book also details a plot in 2006 to bomb seven flights leaving Heathrow Airport, using explosives concealed in soft-drinks bottles. Simon says: "These were to be detonated using a flashlight on a disposable camera taped to the bottle. “

The first camera used by the agency for surveillance, August 1910

The plan was discovered by Operation Overt, one of the biggest ever MI5 and Metropolitan Police counter terror operations. It was nail biting, because they had to leave the arrests until the very final moment, when they had gleaned enough intelligence on everyone involved.

The bombers were arrested before they could board the flights and convicted of terrorist offences. Simon adds: "In subsequent years, MI5 and the police have disrupted more than 43 late-stage attack plots. The Security Service's counter-terrorism work is split roughly between 75 per cent Islamist extremism and 25 per cent extreme right-wing terrorism.

“Thirteen per cent of individuals being investigated by MI5 for involvement in UK terrorism are under the age of 18. The Security Service will continue to disrupt most terrorist attacks, but as its director general ruefully accepted, it will not be able to stop them all."

Quirky revelations in the book include how German spy Karl Müller was caught out by the lemon he used to write his letters in invisible ink.

Invisible ink: the lemon pieces found in a drawer in Karl Muller’s lodgings, 24 February 1915

Co-author Mark Dunton says: “It’s the fact that it was the lemon that was, in effect, fatal for him. We’ve got two of the lemons in our archive - black, shrivelled and compressed though they are. Muller was executed by firing squad at the Tower of London in 1915, but his trial was held in secret and his death concealed, enabling MI5 to continue to send messages to Müller’s German masters in his name."

A Special Branch report from 1936 is also reproduced, discussing one Eric Blair, alias George Orwell, who may or may not be a threat to the public good. A photoset then documents the cache excavation of one Karel Richter, a Nazi spy who parachuted into Britain in 1941 with a radio crystal, £300 and a loaded pistol.

Often regarded by experts as the best spies, women such as Olga Gray - known as "Miss X" - who famously infiltrated the Woolwich Arsenal Spy Ring in 1938, are also discussed.

In 1945, legendary MI5 spymaster Maxwell Knight wrote that "in the history of espionage and counter-espionage a very high percentage of the greatest coups have been brought off by women".

The MI5 Archive: Official Secrets is out now, priced £45 by Thames & Hudson.

Giving further details of Olga Gray’s activities, Stephen recalls the story of a man one cold January night in 1938 hurrying to Charing Cross Station to pick up a package of British defence secrets from a rogue employee.

He says: “The plan was simple: take the records to the safe house, photograph them and pass the copies on to Stalin's Russia. But unknown to him, Special Branch officers had been alerted about his rendezvous, thanks to a remarkable female MI5 agent, Olga Gray."

Nick Harkaway, son of legendary spy novelist and former intelligence officer John le Carré, and author of the book’s forward says: "The book is magnificent: a collection of unequalled and evocative material from the true archives of the Security Service. It smells of card indexes and brush passes and last-minute saves. The actions of spies really do have huge consequences, and the penalties if they are detected may be absolute.

"The notion of a secret order behind events is seductive and even reassuring. It's not just that spies know things we don't, although of course we all feel the pull of the folded note not meant for us; it's that secrets imply that someone, somewhere, has a plan."

*The MI5 Archive: Official Secrets is out now, priced £45 by Thames & Hudson.

• Former CIA spy boss Peter Sichel tells of 'lonely' job that 'leads to alcoholism'