S-31′s keel was laid down on 13 April 1918 by the Union Iron Works in San Francisco, California. She was launched on 28 December 1918, sponsored by Mrs. George A. Walker, and commissioned on 11 May 1922.
Commissioned as improved engines were being developed for her class, S-31 was ordered to New London, Connecticut, toward the end of the summer of 1922 for alterations to her main propulsion machinery by the prime contractor, the Electric Boat Company. Decommissioned at New London on 4 October 1922, she remained in the company's yards through the winter and was recommissioned on 8 March 1923. In April 1923 she moved south and conducted exercises in the Caribbean Sea, then transited the Panama Canal to return to California. She remained on the United States West Coast through 1924, conducting exercises off the coast of California with her division, Submarine Division 16. She took part in exercises in the Aleutian Islands during June and July 1923 and then moved to the Panama Canal area and the Caribbean for Fleet Problems during the winter of 1924.
In 1925, Submarine Division 16 was transferred to the United States Asiatic Fleet, and S-31 departed San Francisco in April 1925, bound for the Philippine Islands. On 12 July 1925 she arrived at Cavite, Luzon. For the next seven years, she conducted patrols and exercises in the Philippines during the fall and winter months and deployed to the China coast for spring and summer operations. The operations off China primarily involved individual, division, and fleet training exercises.
In September 1930, S-31, while engaged in a full-power run off China between Qingdao and Qinhuangdao, surfaced amidst wreckage in heavy seas in the Gulf of Zhili and sighted a Chinese junk which had collided with a steamer. The junk's cargo of lumber had torn loose, endangering S-31 and hindering her efforts to rescue the junk's seven survivors. S-31 made an approach from the windward side, and as the wind pushed her past the stern of the wrecked junk, she took five men off it. S-31′s crew threw lines to the two remaining survivors, and they were hauled aboard S-31 as the rough seas propelled loose wreckage toward her hull. She then cleared the area and proceeded to Qinhuangdao to rejoin her division in exercises.
On 2 May 1932, S-31 completed her tour in the Asiatic Fleet and departed Manila bound for Pearl Harbor, Hawaii, wher she was based with her division until 1937. In February 1933, she took the role of the fictional World War I submarine USS AL-14 for the submarine movie Hell Below. The movie depicted her as sinking an Austro-Hungarian Navy minelayer portrayed by the decommissioned destroyer), though the movie studio actually sank Moody using carefully placed demolition charges.
Designated for inactivation, S-31 cleared Pearl Harbor on 14 June 1937 and arrived at Philadelphia, Pennsylvania, on 27 August 1937. On 7 December 1937, she was decommissioned and berthed in Philadelphia at League Island.
Recommissioned at Philadelphia on 18 September 1940 and assigned to Submarine Division 52, S-31 operated from New London until December 1940, then moved south to the Panama Canal Zone. At the end of the spring of 1941, she returned to New London and subsequently performed submarine warfare and antisubmarine warfare training exercises along the New England coast. In November 1941, she returned to Philadelphia and underwent an overhaul.
The Japanese attack on Pearl Harbor on 7 December 1941 brought the United States into World War II. With her overhaul complete, S-31 rejoined her division at New London in January 1942. In February 1942, she headed back to the Panama Canal Zone. After a stop at Bermuda, she arrived at Coco Solo, Panama, in mid-February 1942 and conducted two defensive war patrols in the approaches to the Panama Canal, the first from 10 March to 31 March 1942 and the second from 14 April to 13 May 1942. Toward the end of May 1942, S-31 headed north to San Diego, California, to prepare for duty in the Aleutian Islands.
The Aleutian Islands campaign began on 3 June 1942 with the Battle of Dutch Harbor and the Japanese occupation of Attu and Kiska. By the end of June 1942, S-31 was en route to the Territory of Alaska, and, on 7 July 1942 she departed the submarine base at Dutch Harbor on Amaknak Island off Unalaska in the Aleutians for her first war patrol. Moving west from Unalaska, she reconnoitered the Adak Island area, then shifted north to her patrol area in the Bering Sea just north of the Aleutian chain. On 19 July 1942, she was ordered further west, and, on 30 July 1942, she took station to the east of Kiska to intercept Imperial Japanese Navy ships moving toward an Allied force scheduled to bombard Kiska. The bombardment took place on 7 August 1942. The following evening, S-31 headed back for Dutch Harbor. During her patrol, she had encountered problems common to all S-boats operating in the Aleutians area: loose superstructure plates, the lack of a fathometer and radar, inadequate interior hull insulation, and poor weather for submarine operations. On 10 August 1942, when she was 60nmi from Dutch Harbor, a Mark X emergency identification flare exploded, inflicting fatal chest injuries on S-31′s commanding officer, Lieutenant Commander Thomas F. Williamson. The U.S. Navy had ordered discontinuation of the use of the Mark X flare on 13 July 1942, but the order had not reached S-31. The accident underscored for the U.S. Navy the need for pharmacist's mates to serve aboard S-boats and for better communications between Dutch Harbor and ships operating in the northern Pacific Ocean.
Inclement weather and sporadic communication, which resulted in two mistaken attacks on S-31 by American aircraft, provided the greatest hazards to S-31 during her fourth patrol, conducted between 26 August and 28 September 1942 in support of the occupation of Adak. For most of the patrol, she was buffeted by turbulent seas, although occasionally she encountered only choppy conditions. On 28 August, a U.S. Navy PBY Catalina flying boat depth-charged her as she crash-dived to 125feet in the Pacific Ocean southeast of Agattu at 51.8833°N 201°W.[1] On 30 August, poisonous chlorine gas formed when seawater driven by a 400NaN0 wind entered her forward battery compartment. S-31′s crew soon detected and eliminated the poisonous gas. On 13 September, two United States Army Air Forces P-38 Lightning fighters — misidentified by crew as two Imperial Japanese Navy Mitsubishi A6M Zero (Allied reporting name "Zeke") fighters — strafed her as she crash-dived in the Pacific Ocean south of Adak, just west of Kagalaska Strait at 51.6°N -202°W.[2]
On her fifth war patrol, conducted from 13 October to 8 November 1942, S-31 operated in the Kuril Islands. She arrived on station on 20 October 1942. On 22 October 1942, she was off Paramushiro at the northern end of the Kurils, and she patrolled the shipping lanes in the Paramushiro-Shumushu area until 24 October 1942. She then headed for Onekotan Strait, and on 25 October 1942 she patrolled in its northeast approaches. On the morning of 26 October 1942, she closed the coast of Paramushiro, and at 08:25 she sighted the Japanese 2,864-gross register ton cargo ship Keizan Maru in Otomae Bay and began an approach. At 09:22, she fired two torpedoes and sank Keizan Maru in the anchorage. At 09:23, S-31 went aground on a reef. She backed off and went ahead. Between 09:28 and 09:55, she grounded several more times at periscope depth. At 10:00, she reached deep water and cleared the area unpursued by Japanese forces. That night, she transited Onekotan Strait through what her crew described as "monstrous seas," and on 27 October 1942 she patrolled along the west coast of Paramushiro. At the beginning of November 1942 she ran low on fuel, and on 2 November she headed for Dutch Harbor, where she arrived on 8 November 1942.
On 11 November 1942 S-31 got underway from Dutch Harbor bound for San Diego, where she provided training services for the West Coast Sound School from 27 November 1942 to 3 January 1943. A refit followed and was completed in February 1943. Toward the end of February 1943, she moved west to Hawaii. There, her 4-inch (102 mm) deck gun was replaced by a 3-inch (76.2 mm) gun, and she conducted further training exercises.
On 11 March 1943, S-31 got underway from Pearl Harbor to begin her sixth war patrol. From 23 March to 29 March 1943 she reconnoitered Kwajalein Atoll and searched the sea lanes between Kwajalein, Truk Atoll, and Wotje for Japanese shipping. On 29 March 1943, she set a course for New Caledonia. She crossed the equator on 2 April 1943 and arrived at Nouméa on Grande Terre on 9 April 1942. After an eight-day refit, she provided services as a target for destroyer antisubmarine warfare training exercises. From 5 July to 26 July 1943 she interrupted her training schedule for her seventh war patrol, which took her into the southern New Hebrides to transport and support a reconnaissance team that landed on Aneityum and to hunt for an Imperial Japanese Navy submarine reported to be operating in the area. On her return to Nouméa, she resumed training exercises and continued them until 20 August 1943.
While in Nouméa, S-31 became the first U.S. Navy submarine to be equipped with a plan position indicator, or PPI. The PPI originally was intended for Admiral William F. Halsey's flagship, the battleship, but crewmen from the S-31 appropriated it for their own use, and it proved remarkably useful during her eighth war patrol.[3] On 22 August 1943, she began her eighth and last war patrol, conducted in the St. George Channel area to intercept Japanese traffic between Rabaul and New Guinea. From her patrol area, she proceeded to Brisbane, Australia. As a result of her increased efficiency using the PPI, the U.S. Navy had production of the PPI expedited for distribution to the rest of its submarine fleet.[4]
After an overhaul at Brisbane, S-31 returned to the New Caledonia-New Hebrides area in early December 1944. There, she resumed antisubmarine warfare training duties, which she continued until July 1944, when she was ordered to California. She arrived at San Diego in early August 1944 for overhaul, which was completed in November 1944. She then provided submarine and sound training services for United States West Coast training commands. Hostilities ended in mid-August 1945, and in September 1945 S-31 proceeded to San Francisco for inactivation. She was decommissioned on 19 October 1945.
Struck from the Navy Vessel Register on 1 November 1945, S-31 was sold for scrap in May 1946. Her hulk was delivered to the purchaser, Salco Iron and Metal Company of San Francisco, in December 1946, and she was scrapped in July 1947.