El Khobar, Dennis Morgan, and the Caid Yousseff scheme dominate the 1939 Moroccan set, as Yousseff’s plan to finance a private railroad to Dakar keeps colliding with native resistance led by the elusive El Khobar, a rebel whose true identity is American Paul Hudson, a veteran of the Spanish Civil War. American journalist Johnny Walsh, Lynne Overman, seeks to bring these assaults to light, but his reports are blocked by a French censor who controls what gets published. The tension thickens when a raid frees imprisoned Riffs and wrecks part of the railroad, and Tarbouch, Marcel Dalio, a native who has helped suppress the Riffs, is captured. In the midst of the upheaval, Paul, who also doubles as a café pianist, confides to Margot, Irene Manning, a French singer, that the Riffs oppose Yousseff but not France itself.
The partnership between Yousseff and Col. Fontaine, Bruce Cabot, becomestense as they plan to locate El Khobar through the cafés where spies are thought to gather. Margot accompanies Fontaine, and the two cross paths with Johnny and Paul at Café Père Fan Fan. A whispered warning from the natives and Paul’s piano notes drive away the soldiers who arrive soon after, leaving the Arabs vanished as if by magic. Paul soon learns that some Riffs are being tortured and resolves to rescue them. Margot, drawn to Paul and sympathetic to the Riffs’ cause, travels into the desert with him, where she discovers his secret identity and chooses to join his effort, surrendering to a growing romance with the rebel-turned-ally.
As El Khobar, Paul sends a message to Yousseff proposing a trade: Tarbouch in exchange for the captured Riffs. Fontaine, standing with Yousseff, pursues the rebel but ends up at Père Fan Fan, finding only Paul at the piano. Suspicion rises when dust on Paul’s boots betrays him, but Paul offers a plausible explanation. Johnny uncovers an impending ambush and hustles to warn Paul, only to be captured by the French who mistake him for El Khobar. That night, Fontaine reveals that he has captured El Khobar and asks Margot to marry him, a proposal she declines, revealing Paul’s true identity in the process. Paul, preparing to say goodbye, learns that the railroad project is funded by German money, not French, a revelation that shifts Fontaine’s loyalties.
In the end, Fontaine joins Paul to capture Yousseff and pledges fair treatment for the Riffs. Paul reclaims his place with his hidden network, and the railroad’s fate moves toward a Paris-bound peace plan. A radio broadcast confirms that France has taken control of the railroad and granted rights to the Riffs, and Margot rejoins the celebration, choosing a new path beside the man she loves.