The crew of an M3 Lee tank, attached to the British Eighth Army, commanded by U.S. Army Master Sergeant Joe Gunn (Humphrey Bogart), and nicknamed Lulu Belle, become separated from their unit during a general retreat from German forces after the fall of Tobruk. Heading south across the Libyan desert to rejoin their command, they come across a bombed-out field hospital, where they pick up a motley collection of stragglers, among them British doctor Captain Halliday (Richard Nugent), four Commonwealth soldiers, and Free French Corporal Leroux (Louis Mercier). Halliday, the only officer, cedes command to Gunn.
The film opens with a family driving down a desert highway. The mother and son are playing I spy when they hit a deer. The dad gets out and walks towards the bushes and comes back with half his face gone. The family is attacked by something foul-smelling.
Three Americans from New York arrive in Tangier in 1947. Port Moresby (John Malkovich) and his wife Kit (Debra Winger) are accompanied by their friend George Tunner (Campbell Scott) on a trip that will take them deep into the Sahara Desert. Tunner observes, "We're probably the first tourists they've had since the war" to which Kit replies, "We're not tourists. We're travelers." While Tunner plans to return home in a few weeks, Port and Kit plan on staying for a year or two.
Titled after a lyric in the Marines' Hymn, which contains the phrase "... to the shores of Tripoli" (which is, itself, a reference to the Battle of Derne) the film is one of the last of the pre-Pearl Harbor service films. When the film was in post-production the Pearl Harbor attack occurred having the studio shoot a new ending where Payne re-enlists.
In September 1942, Rommel's Africa Korps is only 90 miles (144 km) from the Suez Canal, but running dangerously low on fuel. The British approve a plan to destroy German fuel bunkers at Tobruk in an attempt to cripple Rommel's attack.
In 1929, Italian dictator Benito Mussolini (Rod Steiger) is still faced with the 20-year-long war waged by patriots in the Italian colony of Libya to combat Italian colonization and the establishment of "The Fourth Shore"—the rebirth of a Roman Empire in Africa. Mussolini appoints General Rodolfo Graziani (Oliver Reed) as his sixth governor to Libya, confident that the eminently accredited soldier and fascist Grande can crush the rebellion and restore the dissipated glories of Imperial Rome. Omar Mukhtar (Anthony Quinn) leads the resistance to the fascists. A teacher by profession, guerrilla by obligation, Mukhtar had committed himself to a war that cannot be won in his own lifetime. Graziani controls Libya with the might of the Italian Army. Tanks and aircraft are used in the desert for the first time. The Italians also committed atrocities: killing of prisoners of war, destruction of crops, and imprisoning populations in concentration camps behind barbed wire.
Corporal John Bramble (Franchot Tone) is the sole survivor of a British tank crew after a major battle with Erwin Rommel's victorious Afrika Korps. Delirious, he stumbles across the North African desert into the Empress of Britain, a small, isolated hotel owned by Farid (Akim Tamiroff). The staff consists of just Frenchwoman Mouche (Anne Baxter), as the cook has fled and the waiter Davos was killed the night before by German bombing.
In mid-April 1941, during World War II, German Field Marshal Erwin Rommel (James Mason) and his Afrika Korps have driven the British Army into headlong retreat across North Africa toward Egypt and the vital Suez Canal. Standing in Rommel's way is Tobruk, a constant threat to his supply lines. The 9th Australian Division are asked to hold the port for two months, at which time they are to be relieved.
The film opens with a documentary-like scene in which white and black students argue about an impending student strike. Mark (Mark Frechette) leaves the meeting after saying he is "willing to die, but not of boredom" for the cause, which draws criticism from the young white radicals. Following a mass arrest at the campus protest, Mark visits a police station hoping to bail his roommate out of jail. He is told to wait but goes to the lock-up area, asks further about bail for his roommate, is rebuffed, calls out to the arrested students and faculty and is arrested. He gives his name as Karl Marx, which a duty officer types as "Carl Marx". After he is released from jail, Mark and another friend buy firearms from a Los Angeles gun shop, saying they need them for "self-defense" to "protect our women.
In 1845, a small band of settlers traveling across the Oregon High Desert suspect their guide, Stephen Meek, may not actually know where he is going. What was supposed to be a two-week journey stretches into five. With no relief in sight, tensions rise as water becomes increasingly scarce and supplies run low. The wives look on as the husbands discuss what to do, unable to participate in the decision making. The dynamics of power begins to shift when they capture a lone Indian and hold him captive so he may lead them to water. Questions plague the settlers as they press on with dwindling resources: Should they trust Meek? Will the Indian lead them to water or a trap? Are there others following them? How much longer can they survive?
During World War I, the commanding officer of a small British patrol in the Mesopotamian desert is shot and killed by an unseen Arab sniper, leaving the Sergeant at a loss, since he had not been told what their mission is. He decides to try to rejoin the brigade, though he does not know where they are or where he is.
The characters drive to a remote location to hike at a site marked "Wilderness Trail". As they start, they see some other hikers passing by. After some walking, talking, and an impromptu foot race, they decide to head back. Before long, they realize that they are lost. That night, they build a campfire.
In North Africa, experienced Sergeant Kelly (Thomas Mitchell) leads out a British patrol, accompanied by Corporal Colin Spence (Henry Fonda), an unassertive Canadian. When they are attacked by Italian airplanes, they manage to shoot one down, but it crashes on one of their vehicles, killing eight men. Later, Kelly leads the six survivors on an attack of an Italian armored car, but is seriously wounded. He orders Spence to leave him behind; when Spence refuses to obey, he shoots himself.
In the days after the Dunkirk evacuation in Second World War, recently commissioned Second Lieutenant Jim Perry (David Niven), a pre-war Territorial private soldier and a veteran sergeant of the British Expeditionary Force, is posted to the (fictional) Duke of Glendon's Light Infantry, known as the 'dogs', to train replacements to fill its depleted ranks. A patient, mild-mannered officer, he does his strenuous best to turn the bunch of grumbling ex-civilians into soldiers, earning himself their intense dislike. The conscripts also believe that their sergeant is treating them with special severity; in fact, he is pleased with the way they are developing and has his eye on some of them as potential NCOs. Eventually however, the men come to respect their officer.