The spy fictiongenre (sometimes called political thriller) first arose just prior to the First World War, at about the same time the first organized intelligence agencies were being formed. Since its inception the genre has always enjoyed great popular success, but has rarely met with critical acclaim.
Early examples of the spy novel genre include Rudyard Kipling's Kim (1901), based on The Great Game of espionage and politics between Europe and Asia centered on Afghanistan; and Baroness Orczy's The Scarlet Pimpernel (1905), recounting the undercover exploits of an English aristocrat in his attempts to rescue members of the French aristocracy during the French Revolution. Robert Erskine Childers' novel, The Riddle of the Sands (1903), defined the spy novel for the First World War. The most important early spy fiction writer is unquestionably William Le Queux, whose ordinary prose has quite rightly been relegated to used-book stores, but who was one of Britain's highest-selling authors during the pre-WWI years. The second big seller was E. Phillips Openheim. Combined, these two authors produced hundreds of books between 1900 and 1914, but they were all formulaic and of little literary merit.
The inter-war period's pulp spy fiction was mostly concerned with battling Bolsheviks. The first serious spy fiction books began to appear, as do the first books by retired intelligence officers, such as W. Somerset Maugham, who wrote a fairly accurate portrayal of spying in the First World War in his Ashenden; or the British Agent (1928) (which was filmed by Hitchcock as The Secret Agent.
Other major genres were also created in this period: Compton Mckenzie wrote the first successful spy satire, Eric Ambler wrote of ordinary people caught up in espionage, including Epitaph for a Spy (1938), The Mask of Dimitrios (US title A Coffin for Dimitrios) (1939), and Journey into Fear (1940).
In 1940 a British writer named Manning Coles brought out Drink to Yesterday, the first of the critically acclaimed Thomas Elphinstone Hambledon spy novels. This initial book was a fairly grim story set in World War I, but in the next five or six books set in Nazi Germany or World War II England a somewhat lighter tone prevailed although equally grim events were depicted. After the war the Hambledon books became formulaic and critical interest in them waned.
After World War II Graham Greene began drawing on his own spying experience to create a series of left-wing, anti-imperialist spy novels, including The Quiet American (1952), set in southeast Asia, A Burnt-out Case (1961, about the Belgian Congo, The Comedians (1966), set in Haiti, The Honrorary Consul (1973), in Paraguay, and The Human Factor (1978), about spies in London.
Another product of the early Cold War was Ian Fleming's James Bond. Although Fleming too had been a spy, his unrealistic portrait of the world of spying had a monopoly for only a short time; quickly, authors developed anti-Bond figures, the two most noted examples being John le Carré and Len Deighton. They modeled their works on the 1930s authors who were very dubious about the morality of the world of espionage. For the first time American authors also were somewhat successful at breaking the British control over the spy fiction genre, and in the later years of the Cold War, authors such as Tom Clancy and Robert Ludlum became remarkably successful.
The post-war years, especially the 1960s, also saw an explosion of spy films, many based on works of literature. These covered a wide range from the extremely fantastical Bond films to the realism of The Spy Who Came In from the Cold.