At Fort Monckton, the secret service training base just outside Gosport, Hampshire, new recruits to Britain’s Secret Intelligence Service (SIS) still get taught the art of pistol shooting by retired sergeant-majors.

The chances are, however, is that they will never get to use this skill, because the world of spying is almost nothing like its popular portrayal.

Real-life James Bonds, for instance, don’t get to run around like mavericks these days – engaging in car chases, or getting into gunfights like Captain Francis Cromie, a British intelligence officer who was gunned down in a pool of blood by Bolshevik Red Guards in 1918 on the grand staircase of the old British Embassy in St Petersburg. Nor do many intelligence officers get to have sex with their sources of intelligence. “It isn’t normal to sleep with a target. If you have to, it means you are not in control,” said one former British operative I spoke to.

Patrick Stewart and Alec Guinness play Le Carré (Rex)

I have been trying examine the remarkable changes affecting the craft of espionage since the days after the Cold War, against new enemies such as al-Qaeda and Isis and amid a technological revolution. But, before understanding anything, I first had to clear up some basic misconceptions.

One thing rarely understood about espionage, as it came to be understood in the 20th Century, is the difference between actual spies – people like ‘Steak Knife’, Britain’s top secret agent inside the IRA – and the ‘spymasters’, who recruit or ‘handle’ the agents and who are career professionals employed by agencies like the CIA and Britain Britain’s SIS (also known by its one-time codename, MI6) or Military Intelligence.

‘Spooks’ on the BBC (Rex)

Rather than go “undercover” themselves, as Cromie and the spooks in Le Carré and Fleming did, the job of these professionals largely consists of trying to get other people, mostly foreigners and mainly amateurs, to do the espionage for them. So while the perils of spying and betrayal are real, the risks are not shared evenly.

Let’s return to Steak Knife. In my new book, I reveal that, despite having once allegedly killed a British soldier, Steak Knife was persuaded to work for the British when his recruiters played on his resentment at being demoted from his position as officer-commanding of the IRA’s Belfast Brigade. As an IRA security officer, partly responsible for torturing alleged British moles, Steak Knife knew only too well the terrible fate awaiting him if he was discovered. Paid almost a derisory sum for his treachery – barely £10,000 a year at his peak – it was pure adrenalin and a love of the game that was said to keep him going.

The professionals from Military Intelligence who handled Steak Knife did some incredible work to recruit him and then keep him alive. This included giving him gadgets: he had a kitchen radio at his home with a hidden emergency transmitter to summon help and was issued with “sick pills”, medicines to give him diarrhoea and make him vomit uncontrollably so as to excuse himself if he was asked to join a murder mission. Steak Knife’s handlers were ingenious, but they faced none of his mortal dangers.

Morten Storm (Rex)

The same is true at Britain’s SIS, which recruits overseas. Often operating from the safety of British embassies and with diplomatic immunity, SIS has had some low points – from Kim Philby’s treason to peddling bad intelligence on Saddam Hussein’s Iraq – but it has also scaled great heights. It ran the defector Oleg Gordievsky for years inside the KGB and performed what many thought impossible by recruiting moles among senior Chinese Communists.

But, as it was with military operations in Ireland, it is the freelance spies employed by SIS, not its own staff, who shoulder the greatest mortal risks. When Viscount Raymond Asquith, an SIS officer, drove across the Finland-Soviet border in 1985 with serving KGB officer Gordievsky shivering in his boot, it was one of SIS’s greatest coups. But if caught, Asquith faced public exposure and expulsion. His agent, Gordievsky, faced certain death.

No wonder no one from SIS has been killed in action, according to anyone’s recollection, since the Second World War. (Not that blood spilled or recklessness is, of course, a measure of success.) The point is only that the polished image of derring-do cultivated by the intelligence services distorts our understanding of what they have become: not mavericks, rarely iconoclasts, but the staff of a mature Government department.

By the end of the Cold War “they became like any other middle-aged bureaucracy, they defend themselves ferociously,” one former senior CIA executive told me. The same point was made to me by a retired SIS Middle East chief after he mentioned that no one inside SIS had been punished for the bad intelligence on Iraq. “You have to remember we are a Government bureaucracy, with all that goes with it. Everyone knows how to protect their back.” And in this way recent history begins to make sense.

Daniel Craig as James Bond (Columbia Pictures)

The period that led from the end of the Cold War, through 9/11, to the 2003 Iraq War was one when – as peace broke out in Northern Ireland and the Communist threat collapsed – espionage faced not only budget cuts but an increase in those bureaucratic tendencies. These were the years when SIS went from having zero lawyers to 40, and when the agency introduced internal performance reviews, including scores for intelligence officers based on how many “customers” in Whitehall read their reports.

In adapting to a new peacetime environment, the intelligence agencies arguably became too eager to please and too aggressive in promoting their product. Meanwhile, key issues, such as the emergence of Sunni radicalism, got missed. In 1995, MI5 warned: “Suggestions in the press of a world-wide Islamic extremist network poised to launch terrorist attacks against the West are greatly exaggerated.”

The culmination of spying’s bureaucratisation came with the mistaken intelligence on Iraq, and with the scandal of the CIA programme of torture and rendition after the 9/11 attacks. While the United States had the lead in both matters, British agencies were tarnished by their silent complicity, their willingness to accept a politicisation of their work.

At the same time, however, a new accountability that resulted from these failures, combined with an insistent and real threat of terrorist attack, represented a call to arms that has begun to revitalise “the craft”.

Since 9/11, there have been many with real doubts that traditional human spies – as opposed to using the ever-expanding possibilities of surveillance and electronic interception – are much use at all against the principle modern threat of terrorism. Unlike the KGB or even the IRA, some have argued that non-state groups such as al-Qaeda are far too splintered and unstable to be worth spending the years needed to get a spy into a useful position.

Double agent Oleg Gordievsky (Rex)

Some also pointed to a gulf in culture between the Western elites that staff the CIA and SIS and the Sunni fundamentalists whom they hoped to “turn”. (Many made the point that, culturally, there was little difference between the Cold War officers of the CIA and the KGB). But this pessimism has proved to be unfounded. Recent experience has shown that the technical and human approaches need not be rivals. And, equally surprising, it is clear that old-fashioned spies, operating in new ways, can still be effective against modern terrorism.

French, British and US intelligence agencies have put some very brave spies up close and personal to the jihadis. As before, the spies themselves have not been SIS officers recruited from Oxbridge, but instead their amateur recruits – mostly brave youngsters of foreign origin, who have set off as into the lion’s den of al-Qaeda and its successors such as Isis with little hope of aid or rescue.

As Morten Storm, the former Danish biker who spied for the SIS and CIA in Yemen demonstrated, it was even possible for al-Qaeda, which is always hungry for recruits, to accept Western converts to their cause. Storm, who befriended the Yemeni-American preacher and al-Qaeda propagandist, Anwar Awlaki, also showed that terrorists, as well as plotting murder, have ordinary human instincts that can be exploited by spies. As recorded in videos and emails, in 2009, Storm (and indirectly the CIA) served as a matchmaker, finding Awlaki a new wife who arrived in Yemen bearing a suitcase that was – helpfully – fitted out with a tracking device.

For intelligence veterans, the business has changed dramatically, and has almost been rejuvenated. Compared to the past and given the stakes involved, insiders say the operations are more efficient, run at higher speed – but also often shorter-lived, even when successful. Spying is no longer the sort of tedious, long, drawn-out chess game of seduction and entrapment that it was against the KGB. A potential source with doubts or weaknesses might be identified by surveillance of a terrorist group and closely monitored, before being stopped days later as he passes through Heathrow airport when he will be “pitched” to become a secret agent.

Replacing the solitary, need-to-know world of George Smiley is team work. Spies are frequently run by teams set up at SIS headquarters in Vauxhall or across the Thames at MI5’s Millbank headquarters with members of MI5, SIS, the military, but also psychologists, computer experts and the all-important lawyers. One such British operation in Yemen was able to thwart an attempt to blow up a passenger aircraft. Recruited in the UK , the spy, who was of Saudi origin, had been given a British passport and sent to language school in Yemen to follow in the footprints of Umar Farouk Abdulmutallab, the Nigerian “underpants bomber”.

This new operative, a double agent, made it to the mountains of Shabwa, southern Yemen, where he penetrated the cell. In 2012, he was finally sent on a mission with another underpants bomb, which he duly handed over to his handlers. The US then followed up with a series of drone strikes. But the agent involved then had to be withdrawn and resettled.

Which raises the question: who can survive such dangerous missions? One French former freelance spy – whose story I describe in the book, and who travelled to an al-Qaeda training camp in Afghanistan – told me he made it through because he found a way of splitting his personality, adding: “Those people in the groups... always know who is really attracted to this life they lead.” But the danger then is that a spy might suffer “Stockholm Syndrome” and turn back against his Western recruiters. This happened to a Jordanian doctor, Humam al-Balawi, who was sent to spy on al-Qaeda in 2009 in north-west Pakistan. A former jihadi blogger, who Jordanian intelligence believed had been “turned”, Balawi made contact with al-Qaeda’s Number Two, Ayman al-Zawahiri. But when a meeting with the CIA was arranged, he showed his true colours – blowing himself up at a US base in Khost, Afghanistan, and killing seven CIA officers.

To counter this danger of betrayal– and to avoid being taken in by fabricators– at the SIS, spies returning from the field are now subjected to days of evaluation by psychologists, in an attempt to assess if their story is real or if they have been turned. But while the SIS’s star spyGordievesky worked as a mole in Russia for 11 years, today’s may be recruited in a snapshot arrest at an airport, carry a tracking device, betray a bomb plot and then retire rich (or end up being killed) all within the space of a few weeks. We have entered an era of butterfly spies, who enjoy brief but beautiful lives.