In the closing months of World War II, heavy losses and depleted fuel stocks kept many of Japan’s remaining combat aircraft grounded and warships in port, awaiting an anticipated amphibious invasion. Starting in July 1945, Allied battleships embarked on a series of naval bombardments of coastal cities in Japan in an effort to draw these forces out to battle—with little success. However, a week before the battleships began lobbing their massive shells, a legendary U.S. submarine toting a rocket launcher began its own campaign of coastal terror that foretold the future of naval warfare—and also engaged in the only Allied ground-combat operation on Japanese home-island soil.
Submarines still made use of deck guns during World War II, most of them ranging between three and five inches in caliber. These were used to finish off unarmed merchant ships or sink smaller vessels that could evade torpedoes—but also were occasionally directed to bombard coastal targets, such as in early-war Japanese raids on the coasts of California and Australia. The problem was that a single gun was unlikely to inflict much damage in a short amount of time, and the submarines were highly vulnerable to air, sea and land attack as long as they remained surfaced.
In 1942, the German Kriegsmarine actually tested submarine rocket artillery that could be fired underwater, but gave up on the idea due to its impracticality. Rumors that Germany had modified their subs to launch V-2 ballistic missiles at the United States led to a vigorous and bloody submarine hunt  in the closing weeks of World War II.
The U.S. Navy, meanwhile, considered a much cruder solution: taking one of the Mark 51 rocket launchers it used on some of its LSM landing ships and strapping it to the main deck of a submarine. The twelve spin-stabilized 127-millimeter rockets mounted on the launch rack could only be fired while surfaced, and had a maximum range of three miles. However, a full volley could be ripple fired in the space of five seconds. The fixed launcher was unable to traverse, so the entire submarine had to turn to adjust the aim laterally.
Capt. Eugene Fluckey of the Gato-class submarine USS Barb volunteered his boat to try out the experimental rocket launcher in 1945. At the time, the Navy was actually testing the weapon’s viability as an anti-kamikaze weapon, but Fluckey managed to cajole the R&D staff into releasing the Mark 51 in time for his patrol, making the Barb the only rocket-launching submarine of the U.S. Navy in the conflict. You can check out footage of the rocket launcher on the Barb here .
The Barb, which displaced 2,400 tons submerged, was one of the top-scoring Allied submarines of World War II. By the most conservative count, it sank seventeen ships totaling ninety-seven thousand tons of shipping. Other tallies are considerably higher.
In January 1945, on his fourth patrol as commander of the Barb, Fluckey snuck his boat into the shallow waters off of Namakwan Harbor off the coast of China and torpedoed six ships before hightailing away, an action that earned  him the Medal of Honor. Despite this exploit, Fluckey was concerned it would be difficult to find much enemy shipping on his fifth and last war patrol, so he was keen on being well equipped to attack targets on land.
The Barb set sail from its base in Midway on June 8 loaded with one hundred rockets. It arrived off the Japanese home islands on June 20. At 2:30 am on June 22, it surfaced off of the town of Shari in northeastern Hokkaido Island, unleashing a volley of twelve rockets into the slumbering community. It then sailed northward to the coast of Southern Sakhalin Island, then known as the Japanese prefecture of Karafuto. (All of Sakhalin is presently administered by Russia.)
Over the following month, the Barb expended sixty-eight rockets on Shikuka, Shoritori and Kashiho, mostly firing late at night at near-maximum range. She also used her four-inch deck gun to bombard the towns of Kaihyo To, Shibertori and Chiri. The attacks targeted civilian industrial sites, including a cannery, seal rookery, lumber yard, paper factory and several small shipyards, as well as a military radio, radar and lighthouse stations. When Japanese seaplanes began hunting the sub during the day, Fluckey retaliated with a volley of rockets aimed at the Shikuka military airfield. The Barb’s guns also destroyed more than three dozen civilian sampans, while its homing torpedoes took out local trawlers, tugboats and a few large merchant ships.
The Barb’s most famous exploit did not involve those weapons. Observing trains passing along the Japanese coastline, Captain Fluckey hatched a scheme to dispatch a landing party to blow up one of the trains by burying the Barb’s fifty-five pound scuttling charge (essentially a self-destruct device) under the tracks. Rather than using a timer, the explosives would be jury-rigged only to blow when the pressure of a passing train completed the circuit, a trick Fluckey likened to a childhood walnut-cracking prank. A landing party of eight was selected on the basis of their unmarried status and membership in the Boy Scouts. Fluckey believed the scouts would have better pathfinding skills.
At midnight on July 23, the Barb slipped up to within a kilometer of the shore, and a landing party commanded by Lt. William Walke, paddled quietly to the beach. While three men took up guard positions—they encountered a sleeping Japanese guard in a watchtower, whom they left unharmed—the other five buried the demolition charge and managed not blow themselves up jury-rigging the detonation circuit. They were furiously rowing back to the Barb when a second train passed.
Fluckey described what happened next in his autobiography Thunder Below! : “The engine’s boilers blew, wreckage flew two hundred feet in the air in a flash of flame and smoke, cars piled up and rolled off the track in a writhing, twisting mass of wreckage.”
All sixteen train cars derailed, killing 150 passengers. The Barb’s crew added a train to the tally of enemy ships sunk on their battle flag. Its landing party had just performed what would be the only U.S. ground operation on the Japanese home islands during World War II. The Barb continued its rampage along the Sakhalin coastline through July 26 before returning  safely back to its base in Midway Island on August 2.
The Barb’s raids on the Japanese coast—and even those performed by Allied battleships—were premised on the Japanese military’s inability, by 1945, to effectively defend the home-island coastlines, which included a lack of coastal-defense guns . Many of the casualties of the Barb’s attacks were likely civilians in largely undefended towns. On the other hand, targeting civilian merchant ships was a standard practice undertaken by all sides in World War II.
While the rockets the Barb employed appear to have been effective, it’s not clear that they were superior to having another deck gun. But within a decade of the Barb’s last mission, new rocket-based technologies in the form of guided cruise and ballistic missiles drastically reduced the relevance of big guns on warships or coastal defenses. The new weapons could be launched by a submerged submarine a long distance from the shore, safe from immediate retaliation.
Thus the Barb’s last rocket-laden patrol presaged the future of undersea warfare. Submarines, such as the enormous Ohio-class  ballistic missile submarine, which has a variant carrying 154 land-attack cruise missiles , can pose a threat even to a nation with a well-defended coastline. The Barb’s month-long seaside rampage will remain a unique incident for some time to come.
Sébastien Roblin holds a master’s degree in conflict resolution from Georgetown University and served as a university instructor for the Peace Corps in China. He has also worked in education, editing and refugee resettlement in France and the United States. He currently writes on security and military history for War Is Boring .