David Locke (Jack Nicholson) is a television journalist looking for rebels to interview in the African Sahara desert but he keeps failing and at last his Land Rover gets hopelessly stuck on a sand dune. After a long walk through the desert back to his hotel a thoroughly glum Locke finds that an Englishman by the name of Robertson (Charles Mulvehill), who has also been staying there and with whom he had struck up a friendship, is dead. Tired of his work, his marriage and his life, Locke switches identities with Robertson, carefully cutting and swapping the photographs in their passports. As Robertson, he reports his own death and since the hotel manager has already mistaken him for Robertson, the plan goes off without a hitch.
In London, Locke's wife Rachel (Jenny Runacre) has been having an affair with someone else but is guilt-ridden and torn by the news of her husband's death and tries to get in touch with Robertson, to learn more about what happened. Meanwhile "Robertson" (Locke) flies to Europe with the dead man's appointment book.
Otherwise aimless, Locke swiftly learns Robertson was a gunrunner for the rebels and not liked by the government they are fighting to overthrow. Meanwhile a friend of Locke's from the BBC tries to track Robertson down on behalf of Rachel. Locke spots him on the street in Barcelona and asks an architecture student (Maria Schneider as the Girl) to fetch his belongings so he won't be seen at his hotel. She and Locke drive off from Barcelona and become close.
Flush with cash from a down payment on arms he cannot deliver Locke nevertheless is drawn to keep the meetings listed in Robertson's book. Locke begins skirting then fleeing from the Spanish police, whom Rachel has brought in on the search for Robertson, but the Girl is loyal and helpful.
An ever more wary and world-weary Locke sends the Girl away on a bus, saying he'll meet her in Tangiers later. Locke checks into the Hotel de la Gloria in Osuna, Seville to keep another meeting as Robertson and is told his wife is staying in the room next to his own. In it, he finds the Girl. By now Locke seems to have lost all hope and faith in life. His assassination in the late afternoon by agents of an African government takes place off screen in a widely noted, seven minute long take-tracking shot which begins in his hotel room, pulls out into a dusty, run-down square and tracks back into the hotel room.