Roger Corman came up with the idea for the film during a visit to the dentist, when he read a magazine article about Dubrovnik. To take his mind off the pain while the dentist was working, he tried to create a story which could be filmed there. After leaving the dentist, he returned to his office and wrote the first treatment for the script.
Roger Corman directed this movie in between making Poe films (i.e. filmed adaptations of Edgar Allan Poe horror stories) The Masque of the Red Death and The Tomb of Ligeia, the latter of which was the last of his Poe adaptions.
A Yugoslav production assistant liked to fire a real gun in the air when clearing the set of people prior to action.
Director Roger Corman has commented on the script changes of this movie: "Initially, the prisoner being held was an atomic scientist, the only man knowing the missing key ingredient in the equations to make an atomic bomb. So by freeing him, the five criminals help unleash atomic warfare. And UA studio United Artists said they liked the idea but not that man. So I changed him to an Italian general who would lead the resistance against the Nazis and thereby facilitate an Allied invasion of Italy. UA wanted them to be full-out heroes with less subtlety than I might have sought. I had wanted them to unwittingly and ironically do something bad on their way to being heroes. But this was the majors and with a half-million of their dollars at stake, I had a feeling these characters might lack nuance. I knew this was one of the drawbacks to working with the studios - story by committee."
Director Roger Corman once said of this film: "The odd thing about this movie is that it had a very similar plot to an old western of mine, Five Guns West. It also came out before The Dirty Dozen. I've heard stories that the producers of 'The Dirty Dozen' actually postponed production of their film an entire year because they realized that our story-lines were so similar."
Producer Roger Corman once described how this film came about: ". . . Bob Campbell R. Wright Campbell, who had just done The Young Racers for me, had finished a script titled 'The Dubious Patriots'. Once again, the theme was one I liked very much: bad men sent to do good as a way to redeem themselves and win their freedom. In New York--on the way back from Racers--I gave Picker David V. Picker the script on a Friday and he said, 'We'll look at it. But we're backed up with scripts and it might be a few weeks before I can get to it.'" Picker rang Corman on Monday and the picture was given the go-ahead. Corman was surprised because his experience with the major studios was not always positive. Corman added: "It went that fast. Right place at the right time. The title was changed to "The Secret Invasion", which was believed to be more commercial. UA budgeted the production at $600,000, which was double my bigger Poe Edgar Allan Poe pictures. The film was shot in the summer of 1963."
The production did not obtain all the props and extras that had been scheduled due to an earthquake in Yugoslavia. As such, extra soldiers and army equipment were absent from the shoot as the earthquake relief superseded the production of the movie.
The production shoot for this movie went for six weeks, a total of 36 days.
This film had the largest budget Roger Corman had ever had up to this point - approximately $600,000.
This movie is considered to have beaten The Dirty Dozen in having the first film story about World War II prisoners recruited to go on an impossible suicide mission in exchange for pardons. "The Dirty Dozen" had the same plot but didn't come out until three years later.
This movie was filmed on location in Yugoslavia and specifically Dubrovnik, now part of Croatia.
This was Stewart Granger first low-budget independent film after several years of major starring roles, and he had concerns about allowing his character to be less than central to the story. During the filming of the scenes on the Adriatic, the production crew had already created the smoke for the scene when Granger told Roger Corman that he wouldn't do the scene as written due to Edd Byrnes having too much of the dialogue, with his own character having lesser importance. Corman quickly wrote some new dialogue for Granger to satisfy his concerns (though he has declined to state how much of that dialogue made it into the finished film), and filming proceeded before the smoke dissipated.
Yugoslav government officials demanded that Yugoslav Resistance ("Partisan") characters wear red stars on their uniforms. Director Roger Corman tried to stop this, arguing that partisans would not identify themselves to the Nazis in this way, but the Yugoslav officials had their own way. However, Corman found a solution to this visual problem: he had them edited out in post-production.