Kiel, Germany, 1917. U-Boat commander Captain Hardt and his friend and colleague Schuster have their leave interrupted when they are issued with new orders to proceed to the Orkney Islands. Meanwhile, Ann Burnett is preparing herself to leave for her new appointment as a schoolteacher in the Orkneys when she is interrupted by the arrival of an elderly lady. When the lady reveals that she saw Ann's driver broken down by the road, Ann accepts her offer of a lift to the station. However, she is taken instead to an isolated barn, where she is overpowered by the lady's chauffeuse. Later, a woman boards the ferry bound for the island, introducing herself as Ann Burnett, on her way to take up her position as the new schoolmistress.
Successfully negotiating the mines surrounding the Orkneys, the U-Boat arrives off the coast of the island, and Hardt and his motorbike are taken ashore. Following his orders, Hardt avoids the nightwatchmen and makes his way to the schoolhouse, where he is to meet German agent Fraülein Tiel, who has taken Ann's identity. Hardt introduces himself to 'Ann', and is given a meal, before being shown to his room, where she locks him in, ostensibly to prevent him from being discovered. The next day, Ann, with the help of a disgraced English naval officer, Lieutenant Ashington, fills him in on the rest of his orders: Hardt's U-Boat is to intercept and destroy a fleet of 15 British ships, making use of information provided by Ashington.
Later, the island's minister, Rev. Matthews, encounters another churchman, who introduces himself as Rev. John Harris, Ann's fiancé, and asks directions to the school. Before parting, Rev. Matthews invites Harris and his wife-to-be to dinner that evening. Arriving at the schoolhouse, Harris catches the conspirators by surprise, and he finds himself held captive. That evening, however, Rev. Matthews and his wife arrive, demanding to know why Ann and Harris failed to keep their appointment for dinner. Improvising, Ann tells them that her fiancé was taken ill immediately upon arriving and is convalescing in bed. Refusing the Reverend's insistence that his wife stay the night, Ann sends them on their way.
When Hardt and Ashington return after delivering a message to Hardt's crew, Hardt persuades Ashington to leave and corners Ann. He professes his love for her, but is rejected. Hardt leads Ann to believe that he is in bed, so that when she locks the room he conceals himself and follows her outside, where she meets Ashington. Eavedropping, Hardt learns that Ashington and Ann are in love, and that his two co-conspirators are not who they claim to be, but are in fact working for the British.
Ashington takes Ann to the ferry and returns to capture Hardt, but finds only Rev. Harris. Realising that Hardt is impersonating the minister, Ashington, really a British agent, Blakelock, reports to his superiors. Meanwhile Hardt has managed to board the ferry. Learning that the ferry is carrying a group of Dutch prisoners of war, he overpowers their guards and frees the Dutch, taking control of the ship. Despite the protests of Ann, who reveals herself as Blakelock's wife, that he is endangering the lives of women and children, Hardt steers the ship towards Sandwick Bay, where he hopes to make contact with his U-Boat, with Ashington, in a destroyer, on his tail. However, when the U-Boat surfaces Hardt's attempt to identify himself fails, and he finds himself under fire from his own crew. The U-Boat's is intercepted by Ashington's destroyer, and eventually sunk, but not before the ferry has suffered critical damage. As the crew and passengers - including Ann - man the lifeboats, the defeated Hardt resolves to go down with the ship, watched by Ann, while Ashington prepares to receive the survivors.