While undertaking research for his bestselling novel Eye of the Needle, Follett had discovered the true story of the Nazi spy Johannes Eppler (also known as John W. Eppler or John Eppler) and his involvement in Operation Salaam, a non fiction account of which was published in 1959. This was to form the basis of Follett's The Key to Rebecca, Eppler being the inspiration behind the character Alex Wolff, and he spent a year writing it, more than the time he took to write his previous novels Eye of the Needle and Triple. This true story was also later to form the basis behind Michael Ondaatje's Booker Prize-winning 1992 novel The English Patient and the 1996 Academy Award-winning film of the same name starring Ralph Fiennes. Len Deighton's novel City of Gold is also laid against much of the same background.
Many plot elements in the novel are based on actual historical details. The real-life Eppler, like Follett's fictional Alex Wolff, had grown up in Egypt after his mother had remarried to a wealthy Egyptian, and thus had a mixed German and Arab cultural heritage, greatly facilitating his ability to penetrate British-ruled Egypt. Like Follett's spy, Eppler was based at a houseboat on the river Nile, got help from a nationalist-inclined belly dancer in his espionage work, and used a system of codes based on Daphne du Maurier's book Rebecca – which provided the title of Follett's book. And Eppler did request assistance from the Cairo-based Free Officers Movement, who were at the time nominally pro-Axis in the belief that they would 'liberate' Egypt from the British, and specifically from the young Anwar Sadat.
Sadat plays an important role in the plot, and the scene of his arrest by the British is largely derived from Sadat's own autobiography – though the British officer who actually arrested him was not Follett's protagonist, Major William Vandam, a completely fictional character. When seeing Sadat already beginning to think of making the most of his arrest and "preparing to play martyr", Vandam thinks "He is very adaptable, he should be a politician"; the reader, obviously, is well aware that Sadat is the future President of Egypt.
However, Wolff is a far more formidable character than the actual Eppler, who "deliberately sabotaged his own radio, because he wanted to enjoy himself and live with a Jewish prostitute". In contrast, Follett's Wolff - though having a sensual and pleasure-loving side - is completely dedicated to his mission, driven by a curious mixture of German nationalism, Egyptian patriotism and an overwhelming personal ambition. Like the German spy Faber in Follett's earlier Eye of the Needle, he is supremely intelligent, competent and resourceful, and utterly ruthless - ever ready to kill anyone perceived as threatening him, and preferring to do it silently with a knife. However, towards the end of the book, Wolff displays an increasing sadistic streak absent from Follett's earlier spy.
Among other things, Wolff is credited with having crossed the Sahara into Egypt by himself on camel, rather than being ferried there, as was the actual Eppler. To enable Wolff to carry out such an epic feat, Follett provides him with a Bedouin background. Thus Wolff is thoroughly conversant with three distinct cultures; Nazi Germany, the Egyptian urban elites and the desert-dwelling tribes - the last two as distant from each other as they are from the first.
Another major departure is to make Wolff's espionage of far greater strategic significance than Eppler's ever was, making the very outcome of the war – or at least of the North African campaign – hinge on it, and fictionally crediting some of Rommel's main battle victories to information provided by Wolff, having gained access to secret battle plans carried by a Secret Intelligence Service officer.
A departure from cryptologic sense occurs in Follett's title conceit: the "key" or code sequence used to render the Axis spy's messages unreadable by the Allies without it. The author has it as a written down device, available for capture by the wily Major Vandam, but the actual code key imagined by Follett is so simple that a real agent would have simply memorized it, not had it written down for anyone to get hold of. To have it as a mnemonic "key" would have required a different method for the book's climax, either involving a "Bletchley Park" type codebreaker trick (some early "computer" perhaps) or by Vandam pressuring Wolff to reveal it (unlikely, given the obstinate history of the Nazi-Bedouin character).
The quote from Rommel which serves as the book's motto - "Our spy in Cairo is the greatest hero of them all" - is genuine, and the battles of the North African Campaign are described accurately. However, the credit given to information provided by Wolff as decisively helping Rommel's victories - and to Vandam's disinformation in causing his ultimate defeat - is fictional.
The Key to Rebecca was an immediate bestseller, becoming a main selection of the Book of the Month Club, with an initial printing of 100,000 copies within days and having been serialized in several magazines, even before any reviews had been published. Positive reviews of the novel cited its depth in historical detail, and accurate depictions of Cairo and the Egyptian desert in the Second World War. Follett noted that it was due to the success of The Key to Rebecca that he had believed he had truly been successful.
In 1985, The Key to Rebecca was adapted into a film, directed by David Hemmings and starring David Soul as Alex Wolff and Cliff Robertson as Maj. William Vandam. It was filmed in Tunisia and was shot as a two-part, four-hour TV movie; syndicated as part of the Operation Prime Time package, the first part was broadcast in New York City on WPIX on April 29, 1985, with the second part on May 9, 1985. (Dates varied by station.) Produced by Taft Entertainment in association with Castle Comb Productions, it was later shown in the United Kingdom, Scandinavia and several other countries in which the novel had been popular.
Len Deighton's novel City of Gold is set in the same time and place and with a similar theme - the British worried about a spy in Cairo sending information to Rommel. However, in Deighton's depiction, it is ultimately discovered that there had been no spy, and information went to the Germans due to faulty radio security. Like Follett's story, Deighton's is also based on historical fact.