When police officer Moe Finkelstein (Milton Berle) and his colleague Officer Salomon are ordered to serve as bodyguards to German consul Karl Baumer (Otto Preminger) by the mayor of New York City, Finkelstein turns in his badge, convinced he has to quit the service because the man is a Nazi. Capt. Mulrooney, who appointed them to this job, tells Moe that although the mayor personally is opposed to Adolf Hitler and his regime, the mayor is responsible for the safety of everybody, and he feels that through this Job Finkelstein can show them the difference between their system and the Nazi one.
Moe quickly discovers Baumer is in trouble with Berlin for having squandered money intended to finance sabotage. His secretary, Baron Max von Alvenstor (Carl Esmond), has become disenchanted with his boss and refuses to delay the delivery of a damaging financial report to Berlin. Baumer's Czechoslovakian wife, Sophia, confesses to Moe she loathes her husband and married him only to secure her father's release from prison. Also at odds with Baumer is Otto Horst, who has been ordered to procure false identification cards for German saboteurs assigned to blow up an American port at the end of a radio broadcast delivered by Hitler.
Under orders from Berlin to dispense with Horst, Baumer plots to frame Max for the man's murder and tries to enlist Sophia's help, but she warns Horst of the scheme, so he begins to carry a gun for protection. While the Baumers are listening to the radio speech with their guests (Horst, Max, and Dr. Jennings), Horst stabs the Consul with his new knife without the others' noticing it. Then Sophia grabs Horst's gun and kills Baumer. Max urges Sophia to escape before anyone sees her.
Moe discovers the body and begins to question suspects, including Sophia, who readily confesses to the crime, but Max insists it was he who killed Baumer. Moe reveals Baumer not only was shot but was stabbed and poisoned as well. Meanwhile, Max rushes to the port where the saboteurs are concealed and orders them to dismantle the bomb. With only minutes to spare, the bomb is dismantled and the saboteurs are captured. Returning to the consulate, Max identifies Horst as an accomplice to the saboteurs, and Horst is arrested.
A coroner's report determines Baumer died of poisoning. Reconstructing how, they discover that he put the poison in the whisky glass for Max, but when something hit the window during the manifestation outside, the whisky glass for Max and his brandy glass were mixed up, so he accidentally drank from the glass he meant for Max.Edward McNamara ... Police Capt. Mulrooney (uncredited)
Milton Berle ... Officer Moe Finkelstein
Joe Kirk ... Officer Solomon
Joan Bennett ... Sophia Baumer (Wife of General Consul of Germany)
Otto Preminger ... Karl Baumer (General Consul of Germany)
Carl Esmond ... Baron Max von Alvenstor (Secretary to the Consull)
Howard Freeman ... Otto Horst (the American Führer)
Clyde Fillmore ... Dr. Jennings
Poldi Dur ... Frieda (as Poldy Dur) personal maid
Hans Heinrich von Twardowski ... Fritz, Butler (uncredited)
Ludwig Donath ... Hitler's Voice (as Louis Donath)
Ferike Boros ... Mrs. Finkelstein (uncredited)
Gary Breckner ... American Announcer (uncredited)
Ralph Byrd ... Pete, the Dice-Playing Soldier (uncredited)
Ruth Cherrington ... Dowager (uncredited)
Don Dillaway ... Reporter (uncredited)
Eddie Dunn ... Desk Sergeant (uncredited)
J. Norton Dunn ... Saboteur (uncredited)
Byron Foulger ... Drug Store Clerk (uncredited)
Constant Franke ... Gambler (uncredited)
Dick French ... Photographer (uncredited)
Jack Gordon alias Irving Cohen ... Private (uncredited)
David S. Horsley ... Jacoby (uncredited)
Selmer Jackson ... Coroner (uncredited)
Perc Launders ... Drugstore Soda Jerk (uncredited)
Carl M. Leviness ... Dowager's Escort (uncredited)
Malcolm 'Bud' McTaggart ... Soldier (uncredited)
Bert Moorhouse ... Roulette Croupier (uncredited)
Allan Nixon ... Soldier (uncredited)
Ted North ... Saboteur (uncredited)
William H. O'Brien ... Waiter (uncredited)
Cyril Ring ... Drugstore Clerk (uncredited)
Barney Ruditsky ... Policeman (uncredited)
Hans Schumm ... Karl Müller (uncredited)
Tom Seidel ... Soldier (uncredited)
Jack Semple ... Saboteur (uncredited)
Emmett Vogan ... Fingerprint Expert (uncredited)
John Wald ... American Announcer (uncredited)
Wolfgang Zilzer ... Bit Part (uncredited
Otto Preminger had directed and starred as Baumer in the Broadway production of Claire Booth Luce's play, which opened on November 3, 1939, at the Plymouth Theatre, where it ran for 264 performances, and he reprised the role for a national tour in the summer of 1940.
According to the New York Times, 20th Century Fox purchased the screen rights for $25,000 in the spring of 1941 but temporarily shelved the property because studio executives felt Boothe's "statement of the opposition between fascism and democracy had become self-evident to the point of banality." In April 1942, William Goetz, serving as interim studio head while Darryl F. Zanuck was fulfilling his military duty, greenlighted the project and assigned it to director Ernst Lubitsch. Goetz wanted Preminger to reprise his role of Baumer, but Preminger insisted he wanted to direct as well. When Goetz refused, Preminger offered to direct for free and agreed to withdraw from helming the film but remain as Baumer if Goetz was unhappy with his work at the end of the first week of filming, and Goetz agreed.
Preminger thought the screenplay by Lillie Hayward was "awful" and hired newcomer Samuel Fuller, on leave from the United States Army, to help him revise the script. The men agreed Luce's original play, written as a call to arms, had to become a morale booster for a country firmly entrenched in World War II. As such, they presented the story as a flashback to the period prior to America's entry in the war. Principal photography began on September 28, 1942, and at the end of the first week, Goetz told the director he was so pleased with the dailies he was offering him a seven-year contract as director and actor. Preminger requested producing rights as well, and the deal was sealed. He completed filming on November 5, on schedule and only slightly over budget.
Theodore Strauss of The New York Times observed, "Less than brilliant when done on Broadway, the script is now painfully dated. The Nazis certainly are not less villainous, but as they are shown in the film they are much less interesting. Practically every character and situation has long been a cliché of anti-Nazi films generally... There are other examples of worn conventions. Margin for Error tells us nothing new and tells it very dully... As a story the film has practically no suspense. It is not greatly helped by the tediously bombastic style of Otto Preminger as the consul nor by Joan Bennett as his suffering wife. Poor Milton Berle... is forced to forsake his comic antics and make sweet speeches on the benefits of democracy, a role for which Mr. Berle seems way out of line. For that matter, Margin for Error is way out of line as well."
Alexander Larman of Channel 4 rated the film three out of five stars and noted, "Otto Preminger is rightly regarded as one of the most talented émigré directors to have had a successful career in post-war American film. However, Margin For Error, while undeniably entertaining in a B-movie manner, is hardly indicative of his talent, suffering from a plot that alternates between cliche and head-scratching reversals, some unimpressive acting and a limp denouement."