Below deck on their submarine, Indonesian sailors crowded around a crewman with a guitar and crooned a pop song called “Till We Meet Again.”
Weeks later, the same sailors vanished deep beneath the Pacific Ocean while descending for a torpedo drill, setting off a frantic international search. Indonesian military officials said on Sunday, four days after the vessel disappeared, that it had broken into three pieces hundreds of meters below the surface, leaving no survivors among the 53 crew members.
Now, the video of the submariners singing is resonating across Indonesian social media, in a nation where many people are jaded by a steady stream of bad news: devastating earthquakes, erupting volcanoes and sinking ferries.
“If land is not where you are destined to return to, there is a place for you in heaven,” members of the band Endank Soekamti, who composed the song, wrote on Instagram below a clip of the sailors’ performance.
The clip went viral after the Indonesian Navy released it on Monday. Lt. Col. Djawara Whimbo, a spokesman for the Indonesian military, said in an interview on Tuesday that the video had been recorded last month to honor the outgoing commander of the navy’s submarine fleet.
The video has hit a nerve online, in part because the song — which describes a reluctant goodbye — sounds especially poignant in the wake of the accident.
Some social media users speculated that the sailors had a “hunch” about the looming accident and were singing about their own fate. Colonel Whimbo said that was a reflection of “cocoklogi,” an Indonesian phrase that describes looking back at people’s lives to find clues to explain seemingly random events.
People in the Muslim-majority country, from remote villagers to senior politicians, often rely on faith and superstition to understand current events. A succession of Indonesian presidents have paid their respects to the spirit world, consulting with seers or collecting what they believed were magic tokens, for example.
In the years after the 2004 tsunami that killed 230,000 people in Indonesia and elsewhere, many Indonesians blamed the disaster on then-President Susilo Bambang Yudhoyono, saying that he carried the shadow of cosmic misfortune.
Sutopo Purwo Nugroho, a former spokesman for Indonesia’s disaster management agency, told The New York Times in 2018 that he made a point of incorporating local wisdom and traditional beliefs while communicating the science of disasters.
“The cultural approach works better than just science and technology,” Mr. Sutopo said. “If people think that it is punishment from God, it makes it easier for them to recover.”
The latest diaster struck last week, when a 44-year-old submarine, the Nanggala, disappeared before dawn during training exercises north of the Indonesian island of Bali. Search crews from the United States, India, Malaysia, Australia and Singapore later helped the Indonesian Navy hunt for the vessel in the Bali Sea.
For a few days, naval experts worried that the sub might run out of oxygen. Then the navy confirmed over the weekend that it had fractured and sank to a deep seabed.
Among the items a remote-controlled submersible found at the crash site was a tattered orange escape suit.
President Joko Widodo of Indonesia expressed his condolences to the families of the fallen sailors on Monday, calling them “the nation’s best sons” and noting that the government would pay for their children’s education through college.
“May the spirits of the golden shark warriors get the best place at the side of Almighty God,” he said.
The song the sailors sang last month, “Till We Meet Again,” happens to have a complex back story.
The musician Erix Soekamti said that he and his bandmates wrote it about six years ago on a remote island east of Bali, as a tribute to the local people they had met over the course of a monthlong recording session.
The song’s lyrics can be interpreted as fatalistic:
Beginning will end
Rise will set
Ups will meet downs
The song was meant to convey optimism, Mr. Soekamti said, but it has slowly become associated with loss, misfortune and death.
A few years ago, he said, the crowd at an Indonesian soccer game sang it after a goalie for one of the teams died during a previous match. “Then it became a loser song,” he said. “Now, when a team loses, that song will be sung.”
“Till We Meet Again” has been covered by other musicians; a melancholic version by the Indonesian singer Tami Aulia has been viewed more than nine million times on YouTube.
But Mr. Soekamti said his band now avoids playing it and recently declined to include it on an upcoming live album.
“I am sad,” he said, “and, in a way, afraid.”