Van Johnson was loaned to Columbia by MGM, where he was under contract. Being cast as Maryk was a breakthrough for the actor, who felt that he had been in a "rut" by being typecast in light roles. During the filming of the scene off Oahu in which Maryk swims fully clothed to retrieve a line, his character is warned that there are sharks in the water; these sharks do not appear on camera, but the actor's life was saved when a real-life Navy rifleman shot one which was approaching. Lee Marvin was cast as one of the sailors, not only for his acting, but also because of his knowledge of ships at sea. Marvin had served in the U.S. Marines from the beginning of American involvement in World War II through the Battle of Saipan, in which he was wounded. As a result, he became an unofficial technical advisor for the film.