An attractive British Home Office assistant named Judith Farrow (Julie Andrews) is on vacation on the Caribbean island of Barbados after ending a failed love affair with married Group Captain Richard Paterson (David Baron), the British Air Attaché in Paris. She meets Feodor Sverdlov (Omar Sharif), a Soviet military attaché who is also on vacation staying in an adjacent bungalow. The two spend time together exploring the island, visiting museums, and going out to dinner. When British intelligence learns that Sverdlov is spending time with the assistant of a British minister, they begin monitoring their actions.
Judith and Sverdlov share details about their private lives—about her husband who died in a car crash, her recent unhappy affair, his unhappy marriage, and his disillusion with the Soviet Union. During one of their outings, Judith becomes fascinated by the story of a slave who was hanged from a tamarind tree and how that tree has since borne seeds in the shape of a human head. The skeptical Sverdlov thinks the story is a mere fairy tale. On her way back to London, she opens an envelope he gave her and finds a tamarind seed (with a human head shape).
British intelligence officer Jack Loder (Anthony Quayle) is convinced that Sverdlov is planning to recruit Judith as a spy. Loder is already concerned about an unknown Soviet spy within the British government with the code name “Blue”. When he meets with British diplomat Fergus Stephenson (Dan O’Herlihy), he learns that Stephenson suspects that his wife was given secret intelligence information and wants the man identified. Loder knows that his own assistant George MacLeod (Bryan Marshall) has been having an affair with Stephenson’s wife Margaret (Sylvia Syms) and is the source of the leak. Later, Stephenson reveals to Paterson that British intelligence knows about his affair, and that his former mistress has been identified as a security risk based on her contact with Sverdlov. Paterson is instructed to break off all communication with her.
Loder visits Judith in her London apartment and interrogates her about Sverdlov, who is assigned in Paris to Soviet General Golitsyn. Loder instructs her that if he contacts her again she should tell him immediately. Meanwhile, when Sverdlov returns to his Paris office, he is told that his longtime secretary was taken ill and returned to Russia, replaced by another secretary he suspects is a plant. He tells General Golitsyn that he’s made a contact in Barbados, and that he believes he can recruit her. Soon after, Sverdlov meets Judith in London, and she reveals that British intelligence knows about them—just as he suspected. He tells her that he’s told the general that he intends to recruit her—a pretext for seeing her again.
Meanwhile, Stephenson’s suspicious wife Margaret figures out that her husband’s cigarette lighter is a miniature camera and that her husband is in fact a Communist spy. She does not know that British intelligence has been searching for the identity of her husband—given the code name Blue. Soon after, Judith receives an important message for Sverdlov, who is back in Paris. When she phones him, he asks her to deliver it to him in Paris. When she arrives, she conveys the message—that his former secretary was taken to Lubyanka for interrogation by the KGB, and that he should not return to Russia. When Sverdlov shows interest in seeking asylum in the West, Judith contacts her former lover Paterson, who communicates her request to Loder. The next night, Sverdlov is brought to Judith’s apartment to meet Loder and asks for asylum. He offers to provide the identity of the secret Communist spy Blue, in return for a safe new life in Canada. Loder agrees to the deal.
To help Sverdlov pull off the defection, she agrees to accompany him back to Barbados so that his cover story with the Soviets will be convincing. Loder agrees to help arrange their rendezvous. Meanwhile, at a party at the British ambassador’s house in Paris, Paterson’s wife reveals to Stephenson’s wife that she overheard Judith tell her husband about a Soviet official looking to defect. Stephenson’s wife reveals this news to her husband, who suspects Sverdlov to be the defector. The next day, Stephenson meets his Soviet contact and communicates the information. In Paris, Sverdlov meets with General Golitsyn and assures him that he only needs a few more days with Judith to recruit her.
At the Soviet embassy, Sverdlov steals part of the secret file on the Communist spy known as Blue—papers he intends to offer to British intelligence in exchange for his asylum. As he is leaving, however, he is spotted hiding the papers inside his jacket. When General Golitsyn is informed, he orders Sverdlov’s public assassination at Heathrow Airport in London before he can fly to Barbados with Judith. At the airport, the Soviet assassins await his arrival, but Sverdlov avoids them with the help of Loder. General Golitsyn sends his assassins to Barbados to complete their deadly mission. Meanwhile, Loder meets with Stephenson and updates him on Sverdlov’s defection and the secret Blue files that will reveal the identity of the Soviet spy in the British government.
In Barbados, Judith and Sverdlov enjoy a beautiful sunset together and finally make love. The next morning, the Soviet assassins arrive at the island by boat disguised as vacationing businessmen. They blow up Sverdlov’s bungalow with napalm grenades and a fierce gunfight ensues between the killers and the British intelligence agents protecting Sverdlov. Afterwards, news reports indicate that Sverdlov was killed and Judith was taken to the hospital with injuries. Back in London, after telling Stephenson that the Blue files were destroyed in the fire, Loder reveals to his assistant that he knows that Stephenson is Blue and will be taken care of in time. Loder then travels to Barbados to visit Judith who is recovering from her injuries at St Patricia Nursing Home, Barbados. He tells her that actually Sverdlov was not killed as reported, but was taken out of the bungalow just before the attack. He is safe in Canada and if she wants to visit him, it could be arranged. Sometime later, Judith and Sverdlov are reunited in Canada.