Minutes after sunset on 4 January 1984, the body of Beach Boys drummer Dennis Wilson entered the Pacific Ocean from the deck of a US Coast Guard ship.

For civilians, burials at sea happen only with approval from a vice admiral or higher authority. That authority, in Wilson’s case, was also one of the biggest Beach Boys fans in America: the former California governor and then US president Ronald Reagan. His intervention appears to be the only time a president ever waded into funereal matters, and now, for the first time, unpublished records obtained from the Reagan Library, the National Archives and the Coast Guard provide a glimpse into the president’s unprecedented overture.

As the band’s lone surfer, Wilson in his prime had embodied the spirit of the California coast on some of the biggest hits of the 60s. He was also the first Beach Boy to release his own album. In 1977, Pacific Ocean Blue traded upbeat surf-pop for haunting, gospel-tinged ballads – and it became a cult masterpiece following Wilson’s drowning in 1983. A reworked version of an instrumental track from the album, Holy Man, was released on Record Store Day last month. In the vault since 2009, the song features Foo Fighters drummer Taylor Hawkins singing over Wilson’s piano, with guitar and drums by Brian May and Roger Taylor of Queen. Their reinterpretation is a “magnificent contribution” to Wilson’s legacy, says executive producer Jim Guercio.

Reagan’s contribution to that legacy dates to April 1983, eight months before Wilson’s death. The Beach Boys had traditionally headlined 4 July celebrations on the National Mall in Washington DC, until interior secretary James Watt banned rock groups from performing that year. Claiming the Beach Boys attracted “the wrong element” to the event, Watt recruited crooner Wayne Newton to perform instead. The decision triggered a wave of bitter protest among fans and those closest to the president – including first lady Nancy Reagan, who phoned the band to apologise.

Two months later, the Reagans invited the Beach Boys to play a Special Olympics benefit at the White House. They raised $300,000 for the organisation, records show. Following the concert, Reagan offered more than his thanks. “The president said, ‘If there’s anything I can do for you, just let me know,’” says Beach Boys guitarist Al Jardine in a phone interview.

Six months later, Wilson was dead. At 39, drug and alcohol addiction had consumed him; both were reported in his system when he drowned three days after Christmas. “It was just a few days before he was supposed to get involved with some serious rehabilitation,” says Gregg Jakobson, Wilson’s co-writer and producer. “And he never made it.”

That afternoon, Reagan was at home for the holidays in California, taping his annual New Year’s Eve radio address. When he learned of Wilson’s accident, “the president requested that we do whatever was possible for the family”, Craig Fuller, assistant for cabinet affairs, wrote to a constituent.

Ronald and Nancy Reagan with the Beach Boys, a few months after Reagan’s Secretary of the Interior said the band attracted “the wrong element”. Photograph: White House Photo/Reagan Library/Wikimedia Commons

So, when Wilson’s wife and mother requested the burial, a plan was immediately set in motion. “The president and Mrs Reagan asked us to help the family achieve their goal as rapidly as possible,” recalls Fuller today. His cabinet affairs staff accomplished the task in one week. First, the Coast Guard was contacted for “discreet research of facts”, according to an internal memo. Then the department of transportation formally asked top officers at the 11th Coast Guard District in Long Beach, California, to proceed with the burial.

On New Year’s Eve, Commander Jack Stumpff was on call when he received a rare Saturday page. “We seldom got calls after hours for administrative matters,” says Stumpff. He was directed to contact Fuller, who was travelling with the president. “I called and was given the assignment to bury Dennis Wilson.”

“It was very out of the ordinary,” remembers Gill Goodman, the base commanding officer in San Pedro. He inspected Point Judith, the 82ft patrol boat assigned to the burial. Goodman was direct with the vessel’s commanding officer: “Don’t screw this up.”

The following Wednesday afternoon, the Pacific was calm and visibility was good. Point Judith’s crew of 17 picked up Wilson’s family at Marina del Rey, where he had been diving from a boat slip the previous week. Aboard the ship were three of his children, his wife of five months, Shawn Love, and his younger brother, Carl Wilson. The ship travelled for 45 minutes before reaching international waters 600ft deep – the minimum that US federal law requires for full-body burials.

“All I could visualise was my dad’s body disappearing into the water forever,” Wilson’s son Scott wrote in a 2016 memoir.

The Beach Boys in 1967, clockwise from top left: Dennis Wilson, Al Jardine, Carl Wilson, Brian Wilson, Mike Love. Photograph: Michael Ochs Archives/Getty Images

Brian Wilson, who did not attend the ceremony, told the Guardian in 2002 that his younger brother’s burial “seemed wrong to me”. People magazine reported that the arrangement had also upset Carl, who wanted him buried next to their father in Inglewood, near where the boys grew up. But Love insisted her late husband had wanted otherwise. “Wherever he is,” she once said, “I know he’ll be glad that we’re doing it.”

Letters of appreciation from the White House later commended the Coast Guard for its “outstanding performance on very short notice”. But not everyone in uniform supported Reagan’s involvement.

“This ranks a close second to President Carter’s granting of amnesty to draft dodgers of the Vietnam era,” a retired air force major argued in a letter to his congressman. “Wilson was not worthy of this honour.”

“The accidental and untimely death of Dennis Wilson came as a saddening shock to the President and Mrs Reagan,” W Dennis Thomas, deputy assistant for legislative affairs, responded by mail. “The Coast Guard was able to accommodate the request; they were not ordered to do so.”

The California connection that first united the Beach Boys and the president began with his 1981 inauguration, and persisted long after Reagan’s death. On what would have been his 100th birthday, in 2011, the surviving group members reunited with the first lady to honour the man who had helped the consummate Beach Boy realise his dream of retiring eternally to the Pacific.

“The entire career of the Beach Boys is engulfed by Dennis’s love of the ocean,” Jardine says. “And it was only fitting that he return to the ocean.”