John Sidney McCain Jr. (January 17, 1911 – March 22, 1981) was a United States Navy admiral who served in conflicts from the 1940s through the 1970s, including as the Commander, United States Pacific Command.

The son and namesake of a naval officer, McCain grew up in Washington, D.C., and graduated from the U.S. Naval Academy in 1931, after which he entered the submarine service. During World War II, he commanded submarines in several theaters of operation and was responsible for sinking several Japanese ships, eventually being decorated with both the Silver Star and Bronze Star. After the war, he held a variety of commands, specializing in amphibious warfare. He led the U.S. invasion of the Dominican Republic in 1965. He also served in several posts in Washington, including the Legislative Affairs Office and as Chief of Naval Information, where he became influential in political affairs. He was a staunch anti-Communist, and his advocacy of a strong naval presence earned him the nickname of "Mr. Seapower".

During the Vietnam War, McCain was Commander-in-Chief, Pacific Command (CINCPAC), commanding all U.S. forces in the Vietnam theater from 1968 to 1972. He was a stalwart supporter of President Richard Nixon's policy of Vietnamization. McCain played a significant role in the militarization of U.S. policy towards Cambodia, helping to convince Nixon to launch the 1970 Cambodian Incursion and establishing a personal relationship with Cambodian leader Lon Nol. McCain was also a proponent of the 1971 incursion into Laos. He retired from the Navy in 1972.

His father, Admiral John S. McCain Sr., was a naval aviator and Task Force commander during World War II. They were the first father-son pair to achieve a four-star rank. His son, John S. McCain III, was also a naval aviator who was a prisoner of war in North Vietnam during McCain's time as CINCPAC, and later became a United States Senator and the 2008 Republican presidential nominee.

Early years, education, and family McCain was born in Council Bluffs, Iowa, on January 17, 1911. His father, John S. McCain Sr., was a junior officer on the armored cruiser and was away at sea at the time and his mother, the former Catherine Davey Vaulx, was traveling cross-country to visit with her sister. p. 469. He was called "Jack" by his family, although he would also be called "Junior" by others, which he liked less. His family's history of military service extended beyond his father—his paternal uncle was U.S. Army Brigadier General William Alexander McCain. His family tree also contained other people engaged in military service, which extended back through many wars.Timberg, An American Odyssey, pp. 17–34.

McCain grew up at various naval stations where his father was posted and then in Northwest, Washington, D.C., going to local schools and working as a paperboy. His father was away on duty for much of his childhood, and his mother did much of the parenting. He graduated from Central High School in the district.

McCain entered the United States Naval Academy in 1927, aged 16. He disliked the hazing tradition and behavioral restrictions of Annapolis and accumulated many demerits and earned mediocre grades during his years at the Academy. As one biographer wrote, McCain "was given to taking unauthorized midnight leave and spent much of his four ... years in contention with authority and working off massive doses of extra duty." McCain later stated: "I was known as a 'ratey' plebe, and that's the plebe who does not conform always to the specific rules and regulations of the upperclassmen. Some of these upperclassmen would ... require you to do such things which only incited rebellion and mutiny in me, see." At one point, McCain had so many demerits he was at risk of not graduating; his partying and drinking was especially dangerous as it was taking place during Prohibition. During much of his final year there he was banished from Bancroft Hall, the normal residence for midshipmen, and forced instead to live on the barracks ship . He graduated in 1931, finishing 423rd out of 441 in class rank, nineteenth from the bottom.

Upon graduation, he was commissioned an ensign and assigned to duty aboard the battleship in the Pacific.Reynolds, Famous American Admirals, p. 208. He applied to flight school to become a naval aviator, but was turned down due to a heart murmur, and was accepted at Submarine School at Naval Submarine Base New London in Connecticut instead. There, he placed 28th out of 29 in his class.

While stationed on Oklahoma in Long Beach, California, McCain met Roberta Wright, a freshman at the University of Southern California whose father was a successful wildcatter. After Roberta's mother objected to her daughter associating with a sailor,Alexander, Man of the People, p. 11. the couple eloped to Tijuana, Baja California, Mexico, marrying in Caesar's Bar on January 21, 1933. McCain was suspended five days for leaving ship without permission. The couple would have three children: Jean Alexandra "Sandy" McCain (1934−2019, born at Coco Solo Naval Air Station in the Panama Canal Zone); John Sidney McCain III (1936−2018, also born at Coco Solo Naval Air Station); and Joseph Pinckney McCain II (born 1942 at Naval Submarine Base New London).

The family was frequently uprooted as they followed McCain from New London to Pearl Harbor, Hawaii, and other stations in the Pacific Ocean;Alexander, Man of the People, p. 19. Roberta took on the lead role in raising the children. In 1934, McCain was praised for loyalty and for performing his duties very well, but his fitness report said he suffered from nervousness, and he was treated for weight loss at Pearl Harbor Naval Hospital. He served in the old, World War I-era submarines and . From 1938 to 1940, he returned to the Naval Academy for a stint of teaching electrical engineering to midshipmen. He later said of this position, "The lads learned soon enough never to try to hoodwink an old hoodwinker."Moritz (ed.), Current Biography Yearbook 1970, p. 260. In 1940 and early 1941, he sailed in the more modern submarine (SS-184) as part of the Pacific Fleet's SubDiv 15.Blair, Silent Victory, p. 82. In April 1941, McCain was detached to his first command, the antique (SS-69), recommissioned as a training boat at the Submarine School in New London.

World War II After the 1941 attack on Pearl Harbor, McCain would not see his family for long stretches. By then a lieutenant commander, McCain was assigned to command the submarine , joining her in May 1942 for trials and seeing the boat commissioned in August 1942.

Gunnel was deployed as part of the November 1942 invasion of French North Africa. Operating conditions for the five submarines sent there were not favorable, due to overcrowded waters, poor weather, and mixed-up signals, and the deployment had no accomplishments. Like many other U.S. submarines, Gunnel was attacked in error by friendly aircraft.Blair, Silent Victory, p. 265. The Hooven-Owens-Rentschler (H.O.R.) diesels (known as "whores") which powered Gunnel were troublesome; at one point while returning home, drive gears of all four of the main engines were out of commission, and McCain's crew had to rely on their tiny auxiliary engine for the last . Gunnel went into the navy yard for an extensive refit and was replaced on patrol station off North Africa by "Pilly" Lent's .Blair, Silent Victory, p. 256.

After the refit, Gunnel was ordered to the Pacific Fleet, and in June 1943, went on patrol in the East China and Yellow Seas. On June 15, McCain torpedoed and sank the freighter Koyo Maru (6400 tons) in the Tsushima Strait.Cressman, Official Chronology of the U.S. Navy in World War II, pp. 164–165. Early on June 19, he engaged a Japanese convoy that was headed for Shanghai.McCain and Salter, Faith of My Fathers, pp. 86–91. He torpedoed and sank the freighter Tokiwa Maru (7000 tons) and hit a smaller vessel. The convoy's escorts then staged a prolonged counter-attack on Gunnel, dropping depth charges that shook and damaged the boat and grappling hooks that rattled along its hull.

Underwater for hours, sometimes near the seabottom, McCain surfaced; Japanese escorts fired shells at him as he stood on the bridge, while he fired torpedoes back, striking and sinking one (originally thought to be a destroyer, it was the coastal minesweeper Tsubame). He dove again and the Japanese ships continued in sonar-based pursuit. After a total of 36 hours, nearly all spent underwater, Gunnels batteries were about to fail and the air was very hot and virtually unbreathable. McCain surfaced in battle stations position, ready to engage in a disadvantageous gun battle with the Japanese pursuers, but they were heading in the opposite direction and he was able to escape.

Persistent trouble from the submarine's diesel engines then cut short the patrol after only eleven days, after which McCain returned to Pearl Harbor.Blair, Silent Victory, pp. 439–440. Despite the reduced time, the freighter tonnage Gunnel sunk was the second-largest total for any of the sixteen U.S. submarines deployed into operational areas in the Pacific that month.Rohwer and Hümmelchen, Chronology of the War at Sea, 1939–1945, pp. 328–329.

McCain was awarded the Silver Star for this patrol, for "conspicuous gallantry and intrepidity in action, as Commanding Officer of a submarine in enemy Japanese-controlled waters ... [and] bravery under fire and aggressive fighting spirit."Alexander, Man of the People, p. 13. McCain's personality was a good fit for wartime submarine duty. Many of the U.S. submarine commanders trained in peacetime had focused excessively on conformance to regulations and adherence to official tactical doctrine; they lacked the aggressiveness and ability to improvise that the conflict in the Pacific demanded, and by the end of the first year of the war, almost a third of them had been relieved as inadequate. pp. 30–31.

Gunnel was the first Pearl Harbor boat to have her H.O.R. diesels replaced, and she returned to action off Iwo Jima in December 1943. Alerted by Station HYPO intelligence to the presence of aircraft carriers, on the night of December 2–3, McCain fired four torpedoes at Japanese carrier at a very long range of , only to miss as Zuihō zigged.Blair, Silent Victory, p. 527. Although he did not hit it, McCain was one of only a handful of U.S. submarine commanders to actually attack an enemy carrier. Gunnel did sink one ship of 4000 tons during this patrol.Rohwer and Hümmelchen, Chronology of the War at Sea, 1939–1945, p. 372.

On March 18, 1944, on patrol off Tawi Tawi, the main Japanese fleet anchorage in the Philippines, McCain got another shot at a carrier. He fired from extremely long range , missed the target, and sustained a counterattack of sixteen depth charges. He tried to attack the same carrier over the next four days, but could place his boat no closer than .Blair, Silent Victory, p. 582.

During the May 1944 joint American and British Operation Transom air strike on Surabaya, Gunnel lay off Tawi Tawi in company with Robert I. Olsen's , but McCain managed no attacks on Japanese ships. He shifted his operations to the coast of Indochina, where, on June 8, he picked up a convoy, escorted by yet another aircraft carrier. He was unable to approach closer than . In July 1944, he was detached for a brief return to New London.

On his return to Pearl Harbor, the Navy ordered him to command the new starting October 1944, with commissioning two months later. Now a commander,Rohwer and Hümmelchen, Chronology of the War at Sea, 1939–1945, p. 522. during his one patrol with that submarine he damaged a large freighter and sank two guard boat-style patrol craft in the East China Sea and the Taiwan Straits.Blair, Silent Victory, p. 630.Cressman, Official Chronology of the U.S. Navy in World War II, p. 328. For this action, McCain was awarded the Bronze Star Medal with Combat V.