Editor’s Note: This article originally appeared on Business Insider.

On the night of October 24, 1944, U.S. Navy submarine USS Tang was in the Taiwan Strait shadowing a massive convoy of Japanese tankers and transports.

Tang was by then on its fifth war patrol, and as it sailed on the surface, its crew selected three targets and moved in to attack.

Tang fired two torpedoes at each target, sinking one and crippling another. A third ship, a destroyer that had moved to attack Tang, suddenly exploded, either from one of Tang’s torpedoes or from friendly fire by other Japanese ships.

With two torpedoes left, Tang doubled back to finish off the crippled tanker. At 2:30 a.m., it fired its last torpedo, but something went wrong. The torpedo suddenly breached the surface and turned, heading straight for the Tang.

Twenty seconds later, the torpedo struck Tang’s aft torpedo room. It was a tragic and unfitting end for the most successful submarine in U.S. Navy history.

The best record of any US submarine

Commissioned in 1943, USS Tang was a Balao-class diesel-electric submarine with a crew of 87 and an arsenal of 24 torpedoes. Its commanding officer, Lt. Cmdr. Richard O’Kane, had served on five war patrols as the executive officer of the highly successful USS Wahoo.

There were only two years left in the war, but Tang would achieve the best record of any U.S. submarine.

On its first war patrol around the Caroline and Mariana islands, Tang sank six Japanese ships, amounting to 18,000 tons of shipping, with 16 of its 24 torpedoes hitting their targets. Its second war patrol was around Palau, the Philippines, and the Japanese naval base at Truk. Though it didn’t sink any ships, the sub rescued 22 U.S. Navy airmen who were shot down during attacks on Truk.

Its third war patrol was in the Yellow and East China Seas, during which it wreaked havoc on shipping between the Asian mainland and Japan. It sank 10 ships — two of which were hit by torpedoes that Tang fired at other ships — including four in a single engagement. The losses totaled 16,292 tons of enemy shipping.

Now a seasoned veteran, Tang was ordered to operate directly off the Japanese main island of Honshu for its fourth war patrol. In a little over a month, it sank seven ships, including one with its deck gun.

Fifth war patrol

Tang’s fifth and final war patrol was in the Taiwan Strait, an extremely important shipping route connecting Japan to the rest of its empire. O’Kane was given the option of joining a larger U.S. attack group with three other subs but chose to go it alone.

The patrol began with a number of successes. Tang sunk two cargo ships on October 10, and almost two weeks later happened upon a large convoy of five ships with numerous destroyer escorts.

In a daring attack on the night of October 23, Tang charged into the convoy, firing torpedoes in all directions that sank or damaged a number of ships.

Two Japanese vessels attempted to ram the sub but collided with each other after Tang conducted evasive maneuvers. As Tang withdrew, it fired four torpedoes from its stern that sunk both of them.

A malfunctioning torpedo

The next morning Tang discovered another large convoy, shadowing it until that night, when it conducted its final attack.

The final torpedo it launched was a Mark 18 electric torpedo, an American copy of the German G7e that was known to have issues. The cause of the malfunction that forced it to turn has never been established and will likely never be known.

By the time Tang realized the torpedo was heading straight for it, there were only about 15 seconds until impact. O’Kane immediately ordered Tang to accelerate at full emergency power to get ahead of the torpedo, but it was too late.

The Mark 18’s 570-pound warhead hit Tang’s empty aft torpedo room and detonated. Half of the 87-man crew died instantly. With most of the rear compartments flooding quickly, Tang’s stern section sank. The sub was longer than the water was deep, and the buoyancy of the unflooded forward compartments kept the bow above the surface.

Of the nine men on the bridge, three were able to successfully swim to the surface. One officer managed to swim out of the conning tower but was unable to close the hatch. Tang eventually sank and hit the sea floor 180 feet below.

About 30 men were trapped in the forward torpedo room. They burned sensitive documents and endured a Japanese depth charge attack before attempting to escape. This was the first time survivors escaped a sunken U.S. submarine without assistance from the surface, and the first time a breathing device known as the Momsen lung was used.

Of the 13 sailors that managed to escape, just eight made it to the surface, and only five would survive.

Prisoners of war

Nine sailors, including O’Kane, were picked up by a Japanese frigate the morning of October 25. The frigate was also carrying survivors of the ships Tang had sunk the previous night, who beat the survivors from the Tang.

“When we realized that our clubbing and kickings were being administered by the burned, mutilated survivors of our handiwork, we found we could take it with less prejudice,” O’Kane said later.

The survivors were taken to the Ōfuna prisoner-of-war camp on Honshu, where they were held in solitary confinement, beaten, and interrogated until their release after the war ended.

Tang was credited with sinking 33 enemy ships, totaling 116,454 tons, making it the most successful U.S. submarine in history both in number of ships sunk and total tonnage. It received four battle stars, two Presidential Unit Citations, and its commanding officer received the Medal of Honor.

Bill Leibold, the Tang’s chief boatswain’s mate and its last living crew member, recorded an oral history of his experiences for the National World War II Museum.

“That last run, all in all, it was a pretty successful run, except for the final loss. That was us,” Leibold said.

More from Business Insider: