During mid-April 1941 in North Africa, German Field Marshal Erwin Rommel (James Mason) and his Afrika Korps have driven the British Army into headlong retreat 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 charged with holding the port for two months, at which time they are to be relieved.
The defending Allied general (Robert Douglas) chooses British Captain "Tammy" MacRoberts (Richard Burton), an experienced field officer, to take command of a company of newly arrived, untried Australian troops. The no-nonsense MacRoberts is disliked by the undisciplined Australians. He is surprised to see in their ranks his former schoolmaster, Tom Bartlett (Robert Newton). Bartlett, an alcoholic, later explains that after being dismissed from his job in Britain due to his drinking, he went to Australia and joined the army while intoxicated. MacRoberts offers to transfer him to a safer billet, but Bartlett turns him down.
Because of the desperate situation, the inexperienced troops are sent directly into the front line. The men dig foxholes and prepare for Rommel's certain attack. The Allied general masses his artillery where he guesses the Germans will strike. His gamble pays off. Under cover of a sandstorm, they attack exactly where the general predicted and head directly at MacRoberts' men. In the fierce battle, Captain Currie is wounded. Lieutenant Harry Carstairs (Charles Tingwell) abandons his vital post to go to his aid, in vain. After the Germans are beaten back, an infuriated MacRoberts vows to have Carstairs court-martialed for disobeying orders and leaving a dangerous hole in the line, but Bartlett persuades MacRoberts to retract his request.
MacRoberts receives a field promotion to major, then a temporary one to lieutenant colonel after the general elevates him to command of his battalion of Australians. The general then decides to erode the besiegers' confidence by sending out small commando raids every night. MacRoberts' patrols do their part in exacting a toll on the enemy.
One day, the general worries about reports of German heavy artillery being moved up, indicating an attack is imminent. The suspected location of the artillery's ammunition dump is too far away to be attacked by the usual nighttime raid, so MacRoberts proposes using trucks abandoned by the Italians to drive there in disguise and blow it up. MacRoberts leads 54 picked men in three trucks. The attack is a success, but Carstairs is killed and MacRoberts is wounded and captured. While he is being attended to, he meets Rommel, who has been shot by a strafing Spitfire. Although he is respectful to the field marshal, MacRoberts defiantly points out that Tobruk is a thorn in his side. Rommel is bemused by his brashness and orders that he be treated well.
Later, as the prisoners are being transported, their trucks are attacked by RAF fighter aircraft. In the confusion, MacRoberts and Sergeant "Blue" Smith (Chips Rafferty) get away. After an exhausting walk through the desert, they reach friendly lines. The Australians have now held on for eight months.
In November the general tells his officers that a relief column led by General Claude Auchinleck is headed for Tobruk. However, they need to take control of a key hill that overlooks the road that Auchinleck must use. The general asks MacRoberts to take his best company and hold the position for three days. On the morning of the ninth day, fearing that the men can take no more, MacRoberts orders a retreat, though Bartlett begs him to ask the men to hang on. To MacRoberts' surprise, the men refuse to leave. Bartlett overcomes his self-professed cowardice by manning the forward observation post, where survival is measured in hours. Just after the Germans bombard the hill, the Australians hear bagpipes announcing the arrival of Auchinleck's troops. After a hard-fought 242 days, the Allies have relieved Tobruk.
The film is based on the Australian 9th Division, who were charged with the defence of Tobruk under the command of General Leslie Morshead. Hoping to survive against overwhelming odds for two months, the garrison held off the best of Rommel's Afrika Korps for over eight months. Morshead was a distinguished Australian citizen-soldier, but is depicted in the film as the anonymous "General" and played by English actor Robert Douglas.
The film was a quasi-sequel to The Desert Fox: The Story of Rommel (1951), partly made to portray a less likeable General Rommel, after criticism that film had been too friendly to the Germans. Rommel is again played by James Mason only this time he usually speaks in German and is not sympathetic. The title "Desert Rats" was selected to refer to the earlier title "Desert Fox". Mason wore Rommel's real scarf in the film, which had been given to him by the general's widow.
Michael Rennie was originally announced to play to male lead opposite Robert Newton, but eventually the role was taken by Richard Burton. Instead, as he had done in The Desert Fox several years earlier, Rennie delivered an uncredited voiceover.
The script was written by an American, Richard Murphy, who was familiar with Australian servicemen from his time being a liaison officer with the Ninth Division in New Guinea, after its withdrawal from the Middle East in 1942. Several genuine Australian actors were cast, including Chips Rafferty, Charles Tingwell, Michael Pate and John O'Malley. Tingwell and Rafferty were flown to Hollywood from Australia.
Richard Boone, who had just made Kangaroo with Rafferty and Tingwell, was announced for an important role.
Australian journalist Alan Moorehead was used as a consultant and the technical adviser was an Englishman now in the Canadian Army, Lieutenant George Aclund, who took part in the defence of Tobruk.
The battle sequences were shot near Borrego Springs, a Californian desert town. Some background scenes were taken from the documentary Desert Victory (1943).
The title of the film is a misnomer. The "Desert Rats" were actually the British 7th Armoured Division, the name coming from their jerboa shoulder flash. The Australian 9th Division besieged at Tobruk were denigrated as being "caught like rats in a trap" by German propaganda, the Australians calling themselves "the Rats of Tobruk" with pride as a result. One serious error is describing Rommel as a field marshal in 1941, when he was actually holding the rank of lieutenant-general. Rommel would become a field marshal only in June 1942 after the fall of Tobruk.
A German panzer attack shows a short clip of an Allied M3 Grant tank as a participant in the attack. Later, an Allied armoured attack includes Crusader tanks, then, again erroneously, a Churchill tank, which first saw action a year later in the ill-fated Dieppe Raid. The Churchill's first active use in North Africa was at Second Battle of El Alamein in October 1942. German infantry are often seen carrying British and American weapons, including Thompson sub-machine guns.
The Australian troops wear Canadian Army uniforms and South African hats.
Chips Rafferty and Charles Tingwell had both served in the army and said they tried to correct inaccuracies in the script, but were only partly successful. "The script was full of Cockney idiom", said Rafferty. "I was invited to look over it a week before shooting began, and managed to get some of it changed into Australian slang." "There's one scene in which the sergeant – myself – refuses to obey the colonel's order, while two lieutenants stand idly by", added Rafferty. "That will raise some Ninth Division eyebrows."
A key plot point involved the Australian general deliberately letting German tanks through defences. "To my knowledge there was no such plan to let the Germans in through the outer defences", said Tingwell. "But whenever difficulties of that sort were mentioned the Hollywood experts claimed to be working on a script based on the actual battle plans of the campaign."
Other criticisms made of the film include:no British officer was ever placed in command of an Australian battalion in Tobruk;
there was no raid on the ammunition dump as depicted, although there was one on the Twin Pimples, held by Italians.
there is no depiction of the British, Polish or Indian troops who were there.
Prior to the film being screened, Chips Rafferty admitted it was likely the film would be criticised by ex-servicemen. "To tell the truth, I think there's going to be a bit of a howl", he said.
This prediction proved to be correct. Lt-General Sir Leslie Morshead said that, "The story is wholly foreign to the Tobruk I knew, and to its force which comprised almost as many gallant, purposeful British troops as those of the Ninth Division, all of whom I had the honour to command."
The film received generally good reviews from British critics, although they complained the British contribution to the campaign had been minimised. Australian critics were also positive despite the historical inaccuracies.
The film was banned in Egypt.
During production, 20th Century Fox offered Charles Tingwell a seven-year contract but he turned it down because he wanted to keep working in Australia.