It was a coconut that sent William Liebenow on a mission to rescue the man who would become president.

A tenacious Navy commander in World War II, Liebenow’s acts of heroism stretched from the waters of the South Pacific to the beaches of Normandy — evading the enemy, launching torpedoes, rescuing more than 60 men from a sinking ship on D-Day. But none of these were the tale of war that would come to define him.

Everyone wanted to hear about the time he saved the life of John F. Kennedy.

Last week, the story was remembered — coconut and all — as Liebenow, who died last year at 97, was laid to rest at Arlington National Cemetery. Under the clear sky of an unseasonably cool August day, the former lieutenant’s ashes were carried by horse-drawn carriage to a grassy hill less than a mile away from the spot where Kennedy himself is buried beneath an eternal flame.

Although grateful for the honor being bestowed, Liebenow’s children said their father would have been embarrassed by the pomp and circumstance. He was not one to boast about his past. His family knows the extent of his achievements only because of the journalists, historians and documentarians who contacted their father in his waning years, hoping to capture the stories of “the greatest generation” before those who remember them are gone.

“There wasn’t a whole lot to it,” Liebenow would tell them, and then, with the nonchalance of someone recounting a trip to the grocery store, he’d recall that night in 1943.

Liebenow had joined the Navy almost immediately after Pearl Harbor. Almost two years later, he was stationed in the Solomon Islands, an archipelago east of Australia and Papua New Guinea. One of his tent mates was a 26-year-old skipper from Massachusetts, “Jack” Kennedy.

Both men were the commanders of patrol torpedo boats, better known as PT boats. These swift, wooden ships held about a dozen men, four deadly torpedoes and three powerful engines that could send them zooming across the water and between the bulkier Japanese warships they were up against — usually. During one night patrol, Kennedy’s boat couldn’t get out of the way quick enough. It was rammed by a Japanese destroyer.

PT-109 was cut in two. Its engine, powered by high-octane gas, exploded. Two men were killed. The others clung to the boat’s floating front end.

Eventually, Kennedy and 10 survivors swam four hours to reach a small, unoccupied island where they could wait for help to come. For six days, they subsisted on coconuts and hope.

Kennedy tried moving his crew to another nearby island. He tried swimming into the ocean at night, thinking he might be able to intercept another PT boat on patrol. But back on the island where the United States was stationed, the leadership assumed the explosion had left no survivors. No rescue boat was coming. The man who would go on to become the 35th president seemed destined, at this point, to survive only a few days.

Then his crew was spotted by two Pacific Islanders passing by in a canoe. Eroni Kumana and Biuku Gasawere were two of the many men who had been enlisted by Western forces to help fight the war that had imploded the safety of their islands and way of life. Although Kennedy couldn’t be sure who these islanders were fighting for, he knew there was a chance their canoe would be headed back to a place occupied by allies. He needed a way to send a message with them.

He didn’t speak their language. He did not have any paper. He had a knife and an island full of coconuts.

He picked one up and began to carve. “11 ALIVE . . .,” he wrote. “NEED SMALL BOAT.”

It worked. The coconut was carried to an Australian coast watcher, who relayed the message to the U.S. base on the island of Rendova. But when it arrived, the Navy brass were skeptical. Could this coconut be a trap to lure U.S. fighters into an ambush? It was decided that only one boat could be sacrificed for a rescue attempt. If the mission was unsuccessful, if their enemy intercepted the crew on its way, Kennedy and his men would not have been saved.

Seventy years later, when Liebenow was asked by historians why his boat, PT 157, was picked for the job, he’d sometimes offer the truth: They were “the best boat crew in the South Pacific.” Often he preferred to repeat one of his crew members’ jokes: “We were the most expendable.”

Into the water they went, with Liebenow in command. He had to reach Kennedy as quickly as possible, but travel slowly enough that they wouldn’t create a wake big enough to alert the nearby Japanese ships of their presence.

John Hersey, who would go on to write the famous New Yorker epic “Hiroshima,” described what happened next in a 1944 story for the magazine. When Kennedy saw PT-157, he shouted, “Where the hell you been?”

“We got some food for you,” Liebenow called back.

“No, thanks,” Kennedy replied. “I just had a coconut.”

The epic of the PT boat and the coconut would go on to become Kennedy lore and a presidential selling point. Seventeen years after rescuing him, Liebenow helped Kennedy campaign in Michigan. The candidate said he regularly met veterans who swore that they were on the boat that rescued him in the South Pacific.

“Lieb,” Kennedy told his old friend, “If I get the votes of everyone that claims to have been on your boat the night of the pickup I’ll win a landslide.”

When he won, Kennedy kept the coconut shell, which he had made into a paperweight, on his desk in the Oval Office.

By then, Liebenow was married with two children. He worked as a chemist for the Chesapeake and Ohio Railway. He was a hero who seemed happy to become just a regular guy.

“He lived his life as a Clark Kent,” said Bridgeman Carney, who befriended and interviewed Liebenow late in his life. Though he originally contacted Liebenow about model PT boats, Carney ended up self-publishing a book called “First-up: Chronicles of the PT-157.”

He wanted to commemorate not just names and numbers, but a mind-set he and Liebenow’s children believe is disappearing. In an interview on the day before the burial at Arlington, Liebenow’s son, Mike, described the war his father fought in as starkly different from what he saw in Vietnam, or what his children, who were also in the military, saw in Afghanistan.

Remembering the way their father would brush off praise and speak only of duty, the Liebenow family was at first hesitant to have a reporter attend the ceremony at Arlington. His daughter, Susan Liebenow, said, “My dad would always say, ‘I was just doing my job.’?”

After the Navy band had sounded taps, after the folded American flag was presented, after the mourners were escorted back to their cars, there remained one symbol of what Liebenow’s job had meant to the country.

Beside his final resting place was a wreath and a bundle of red and white flowers. On a small piece of paper clipped to the front was a note from Caroline Kennedy, the only surviving child of the president. It was signed, “With deepest appreciation.”