In the summer of 1940, Captain Karel Hasek (Michael Redgrave) of the Czech army escapes from Dachau concentration camp and assumes the identity of a dead British officer, Captain Geoffrey Mitchell. When he is caught, he joins thousands of British prisoners of war, captured during the Fall of France, on a march to a prison camp.
He is suspected of being a spy by his fellow soldiers because of a few small errors and his fluency in the German language. Captain Grayson (Guy Middleton) wants to lynch him forthwith, but Major Dalrymple (Basil Radford), the senior British officer, hears Hasek out and believes his story.
To avoid suspicion, he has to maintain the fiction that Mitchell is still alive by corresponding with Mitchell's widow Celia (Rachel Kempson). Prior to the war, Mitchell had abandoned his wife and their two children, but the letters rekindle Celia's love.
After their escape tunnel is discovered, the prisoners resign themselves to a long stay. In 1944, when Herr Forster (Karel Stepanek), who ran Dachau during Hasek's stay, visits the camp, Hasek fears he may be unmasked. The official compliments him on his nearly perfect German and seems to recognise him, but cannot quite place him. Hasek is sure time is running out; it is announced that some prisoners are to be repatriated, but when he goes for his medical examination to see if he qualifies, he is turned away. A plan is devised to save him (without his knowledge). Private Mathews (Jimmy Hanley), a burglar in civilian life, breaks into the Kommandant's office late at night with two other men. They find the list of those to be repatriated and replace Mathews' own name with Mitchell's. On the way back to the barracks, Mathews is attacked by a guard dog and rescued by Hasek. The plan works, and Hasek is "returned" to Britain.
He goes to see Celia. He breaks the news of her husband's death and that he has grown to love her. She is devastated, and Hasek leaves. After she recovers, she begins rereading his letters and realises that she has come to love the writer. When Hasek calls her on the telephone on the day that Germany surrenders, she is eager to speak with him.
Many of the prisoners were played by serving soldiers.
One of the locations used was the ex-naval prisoner of war camp Marlag, near Westertimke, which had remained largely intact after the end of the war the previous year.
According to trade papers, the film was a "notable box office attraction" at the British box office in 1946.
It was the biggest hit at the British box office in 1946 after The Wicked Lady, The Bells of St Marys, and Piccadilly Incident.