Major William Foster, Gene Hackman, an American commander in the French Foreign Legion, is haunted by memories of the Great War that has just ended and struggles with alcoholism, his only steadfast friend being the sergeant Triand, Rufus. He is sent to command a legion bound for Rif in Morocco to reassert French authority over Bedouin and Berber tribes resisting French rule, while also escorting Louvre archaeologists excavating near Erfoud, the fabled resting place of a Berber saint known to the French as “the Angel of the Desert.” Foster is the sole French officer who served in Morocco before the war and had once cultivated diplomatic ties with the tribes by negotiating with El Krim, their de facto leader, a peace that demands the French halt all archaeological digs without tribal approval.
Among Foster’s new unit are “the Gypsy” Marco Segrain Terence Hill, a dashing jewel thief with a Riviera past; the Russian giant Ivan, Jack O'Halloran; “Top Hat” François Gilbert André Penvern, a fashionable musician who lacks the harsh edge of a soldier; and Frederick Hastings, Paul Sherman, a romantic English aristocrat who longs for the glory days of the Great War. The four men quickly grow disillusioned with Legion life as Foster pushes them through tough discipline, especially Marco, who charms one of the archaeologists, Simone Picard, Catherine Deneuve. The train is soon intercepted by tribesmen, and El Krim returns to confront his old friend, declaring that Morocco now belongs to his people and that the French are no longer welcome. He reveals he has tortured two French archaeologists captured earlier, gouging out their eyes and tongues, and urges Foster to carry this “gift” to the French Premier. In a desperate move, Foster shoots the two archaeologists to end their suffering, one of them later revealed to be Simone Picard’s father, and presses on toward a French fortress.
At the fortress, Foster subjects his men to brutal, unforgiving training. Top Hat, abandoned on a march, returns to camp and commits suicide to escape further abuse. Hastings is kidnapped and tortured to death by a tribal raider; El Krim calls the raider overzealous, and Marco kills the raider in retaliation. Foster bluntly tells El Krim that Marco was also overzealous—and El Krim accepts the judgment.
When the tomb of the Angel of the Desert is found, Foster offers the golden sarcophagus to El Krim as a token of peace, but the Bedouin warriors rally to slaughter the Europeans. The Legionnaires fight back with precise training, killing hundreds before they are overwhelmed. Ivan falls, and Marco fights to prevent the Bedouins from outflanking them. Foster is fatally wounded, and El Krim orders the surviving legionnaires to carry Foster and their dead back home and to “tell the world what happened.”
The ending varies by version: the television cut shows Marco deserting with Simone Picard, while the theatrical release closes with Marco, awarded for bravery, remaining behind to train new recruits and repeating Foster’s warning: If the Legion doesn’t get you, the desert will. If the desert doesn’t, the Arabs will. And if the Arabs don’t, then I will. I don’t know which is worse.
> If the Legion doesn't get you, the desert will. If the desert doesn't, the Arabs will. And if the Arabs don't, then I will. I don't know which is worse.