In this July 9, 1960, photo provided by the U.S. Navy, the nuclear-powered submarine USS Thresher is launched at the Portsmouth Naval Shipyard in Kittery, Maine. Fifty years ago 129 men lost their lives when the sub sank during deep-dive testing off Cape Cod.

KITTERY, Maine — The first sign of trouble for the USS Thresher was a garbled message about a “minor difficulty” after the nuclear-powered submarine descended to about 1,000 feet on what was supposed to be a routine test dive off Cape Cod.

Minutes later, the crew of a rescue ship made out the ominous words “exceeding test depth” and listened as the sub disintegrated under the crushing pressure of the sea. Just like that, the Thresher was gone, along with 129 men.

Fifty years ago, the deadliest submarine disaster in U.S. history delivered a blow to national pride during the Cold War and became the impetus for safety improvements. To this day, some designers and maintenance personnel listen to an audio recording of a submarine disintegrating to underscore the importance of safety.

“We can never, ever let that happen again,” said Vice Adm. Kevin McCoy, an engineer and former submariner who now serves as commander of the Naval Sea Systems Command in Washington, D.C.

This weekend, hundreds who lost loved ones when the Thresher sank will gather at memorial events in Portsmouth, N.H., and Kittery, Maine.

Built at Portsmouth Naval Shipyard in Kittery, and based in Groton, Conn., the first-in-class Thresher was the world’s most advanced fast attack submarine when it was commissioned in 1961.

Featuring a cigar-shaped hull and nuclear propulsion, the 278-foot-long submarine could travel underwater for unlimited distances. It could dive deeper than earlier submarines, enduring pressure at unforgiving depths. It was designed to be quieter, to avoid detection.

On April 10, 1963, the submarine already had undergone initial sea trials and was back in the ocean about 220 miles off Cape Cod, Mass., for deep-dive testing. Some submariners are baffled by the initial message about a minor difficulty because it’s believed a brazed joint on an interior pipe had burst — a problem anything but minor.

The Navy believes sea water sprayed onto an electrical panel, shorting it out and causing an emergency shutdown of the nuclear reactor.

The submarine alerted the USS Skylark, a rescue ship trailing it, that it was attempting to surface by emptying its ballast tanks. But that system failed, and the sub descended below crush depth.

Understanding their dire situation, Navy crew members and civilian technicians would have scrambled to close valves to try to stem the flooding, struggled with a ballast system disabled by ice, and worked to restore propulsion by restarting the reactor, a 20-minute process.

Their deaths would have been instant because of the force of the violent implosion. The sub’s remnants came to a rest on the ocean floor at a depth of 8,500 feet.

There was nothing the divers on the Skylark could do.

“It’s one of those times when there’s silence,” recalled Danny Miller, one of the Skylark divers, now 70 and living in Farmington, Mo. “You don’t know what to say. You don’t know how to feel. You just know something tragic has happened.”

The Thresher wreckage covers a mile of ocean floor, according to University of Rhode Island oceanographer Robert Ballard, who used his 1985 discovery of RMS Titanic as a Cold War cover for the fact that he had surveyed the Thresher on the same mission.

“It was like someone put the submarine in a shredding machine,” Ballard said in a recent interview. “It was breathtaking. There were only a couple of parts that looked like a submarine.”

Word of the disaster spread quickly.

Paul O’Connor, now a union president at Portsmouth Naval Shipyard, remembers seeing the bulletin on TV. He was 6. Barbara Currier, whose husband, Paul, was a civilian worker on the Thresher, was shopping with her daughters when she heard the news on the radio in a store.

What followed was a blur of activity for families. Navy officers in dress whites showed up on doorsteps. Friends and neighbors brought food.

After the submarine was declared sunk, President John F. Kennedy ordered the nation’s flags lowered to half-staff. International leaders sent condolences.

“The men, they were heroes. Most of them were doing what they wanted to do for their country to keep the country safe,” said Currier, 86, who never remarried and still lives in the same house in Exeter, N.H. “They were pushing things to the limit.”

For the families, the silver lining is that subs are now safer. The Navy accelerated safety improvements and created a program called “SUBSAFE,” an extensive series of design modifications, training and other improvements.

People involved in the SUBSAFE program are required to watch a documentary about the Thresher that ends with an actual underwater recording featuring the eerie sounds of metal creaking and bending as a U.S. Navy submarine breaks apart with the loss of all hands.

“Every job we do, we need to have in the back of our minds that we have the lives of the sailors in our hands. It’s that critical and it’s that literal,” said O’Connor, president of the Metal Trades Council.

Hundreds of family and friends of the Thresher’s crew, along with sailors who previously served on the submarine, will gather today for a memorial service in Portsmouth, N.H. A day later, neighboring Kittery will dedicate a flagpole that stretches 129 feet high in remembrance of the number of lives lost.

Because of their tender ages, and the lack of a body or proper grave site, children like Vivian Lindstrom, who lost her father, Samuel Dabruzzi, a Navy electronics technician, were unable to grieve properly.

Thanks to the reunions, they at least know they’re not alone, said Lindstrom, of Glenwood City, Wis.

“We’ve experienced the same things, felt the same things,” she said. “We feel like family. We call ourselves the Thresher family.”