Sergeant Mike Kincaid is an American sergeant of the French Foreign Legion who, during an undercover operation, helps capture a key Rif prisoner. His bold actions land him in prison after he strikes a lieutenant who has just beaten a French woman, Marie DeLatour, with his riding crop for preferring Kincaid. The lieutenant, now in command of Tarfa, uses this incident to settle a personal score and assert his control over the garrison.
Kincaid is imprisoned alongside seven military prisoners and the captured Rif who refuses to talk, while the lieutenant denies them food or water. Two comrades-in-arms, Luis Delgado and Pierre Molier, sneak in supplies to keep them alive, and Kincaid shares the rations with the Rif captive. Delgado, trying to atone for telling the lieutenant about Kincaid's assignation with the Frenchwoman, reveals a looming attack on Tarfa, hoping to force a response from the officers. The Rif leader, Khalid Hussein, believes Kincaid will flee, but instead he warns the lieutenant and lays out a bold plan.
The seasoned Kincaid argues that the only chance to save Tarfa is to release him so he can lead a guerrilla campaign—hit-and-run actions designed to delay the enemy for five days until the regiment can return. The lieutenant consents, but only on the condition that Kincaid testify that the idea was his. Kincaid agrees, and the ten men who will undertake the mission are made up of the seven prisoners plus Delgado and Molier, now granted pardons.
As they reconnoiter, they discover the enemy has formed an alliance between two rival tribes, giving them the strength to threaten the city. Relying on his skills in disguise and language, Khalid Hussein uncovers a critical detail: the alliance hinges on marrying Mahla to seal the pact. Kincaid abducts Mahla to force the enemy to chase them for five days, turning the odds in their favor.
Despite the danger, Mahla begins to feel drawn to her captor, adding an emotional layer to the pursuit across the desert. In a stroke of luck, the desert patrol stumbles upon a destroyed Legion truck and a safe stuffed with payroll money. When Jardine, attempts to flee with the payroll, he is shot, and the stolen funds expose the hiding place of the group.
Kincaid is eventually captured while Mahla is freed. She makes a bold stand, demanding Kincaid’s release, threatening to break off the marriage unless he is spared. Hussein reluctantly agrees to let him go, and the Legionnaires slip into the wedding ceremony. A fierce clash erupts, and Mahla’s tribe shifts sides at the critical moment, leading to the death of the warlord.