Good times never seem so good (so good, so good, so good) as when Neil Diamond’s 1969 hit “Sweet Caroline” is being sung by a huge crowd. The carefree singable track debuted in May 1969, becoming the ultimate summer hit, spending 14 weeks on the charts, peaking at No. 4 on the Hot 100.

Since then, it’s been covered by notable artists like Elvis Presley, Frank Sinatra and Roy Orbison — and become the unofficial anthem of the Boston Red Sox. “It somehow had a connection to the spiritual nature of people’s lives,” Diamond told Red Sox historian Gordon Edes in a 2020 interview for the baseball team’s site. “Maybe it’s the joy of singing it too… Chills, thrills, sing it from the hills!”

The Caroline whose sweetness has charmed audiences for decades remained a mystery until Diamond revealed the inspiration in 2007: a childhood photo of Caroline Kennedy, daughter of John F. Kennedy and Jacqueline Kennedy Onassis.

And the two didn’t even know each other. The unlikely inspiration came from a photo of Kennedy when she was about seven years old — even though Diamond was 17 years her senior.

Diamond wrote “Sweet Caroline” in about 30 minutes

Diamond had already found success with chart-topping hits like 1966’s “Cherry, Cherry” and 1967’s “Girl You’ll Be a Woman Soon” when he was preparing for a recording session.

“‘Sweet Caroline’ was born in a motel room in Memphis, Tennessee, really as an afterthought to some songs I had specifically prepared for the next day’s recordings,” he told the Red Sox’s site. “When it came out of me in that humble little room, I was as surprised as the next guy.”

Diamond knew he was onto something right away: “The minute it did come out of me, I knew it was special and had some other special meaning other than potential commercial success. Most songs take planning and thought. ‘Sweet Caroline’ has none of those elements in its creation.”

And the song pretty much spilled onto the page. “The whole thing took about a half-hour,” he said on the Today show in 2014. “When I wrote the song, I thought, ‘This is some kind of magic that happened.’”

He was taken by a photo of Kennedy in her riding gear

The most challenging part of the song was finding the right name to dedicate the simple love song too. At the time, he was married to Marcia Murphey, and had promised her a song. But he just couldn’t get her name to fit the melody.

“I couldn’t get Marcia into the three-syllable name that I needed, so I had Caroline Kennedy’s name there from years ago in one of my books,” he said on Today.

The name seemingly made it into his notes years before that when he was a “young, broke songwriter,” he revealed to the Associated Press in 2007.

He had been taken by a photo of Kennedy in a news magazine. “It was a picture of a little girl dressed to the nines in her riding gear, next to her pony,” Diamond said. “It was such an innocent, wonderful picture, I immediately felt there was a song in there.”

While it remained in the back of his head, the name finally found its lyrical match about five years later in that Memphis hotel room. “I tried ‘Sweet Caroline’ — that works,” he recalled on Today. “It didn't work with Marcia, so I couldn’t tell her that I dedicated the song to her. It was almost Marcia…[but] there was no way to squeeze it in.”

So the song came out in 1969 — bearing the name of the former first daughter who was 12 at the time — except that no one knew that for decades.

John F Kennedy stands outdoors with his wife, Jacqueline Kennedy, as their daughter, Caroline, sits atop a pony and their son, John Jr., holds his arms out.

John F Kennedy stands outdoors with his wife, Jacqueline Kennedy Onassis, as their daughter, Caroline, sits atop a pony and their son, John Jr., holds his arms out.

Kennedy was 'really happy' to learn the song was inspired by her

When the song became popular at Boston Red Sox games, some did hypothesize that Kennedy could be the subject of the song — after all, her family had such a legacy in Massachusetts and it was the closest baseball team. (Actually, Amy Tobey, who determined the Sox’s music from 1998 to 2004, chose to play the track at games.) Others thought there was some tie between the last name “Diamond” and the baseball diamond, but the singer is Brooklyn-born and a Brooklyn Dodgers fan, so that didn’t hold up either.

As it turned out, Diamond had been keeping the secret until he had a chance to tell Kennedy in person. “I've never discussed it with anybody before — intentionally,” he told AP in November 2007. "I thought maybe I would tell it to Caroline when I met her someday."

He finally did when he performed for her 50th birthday via satellite. “I thought she might be embarrassed, but she seemed to be struck by it and really, really happy,” he said of the big reveal. “I'm happy to have gotten it off my chest and to have expressed it to Caroline.”

Diamond calls the "Sweet Caroline" the 'most important song of my career'

The song has continued to have a powerful hold on audiences — and also found significance during troubling times. After the 2013 Boston Marathon bombing, Diamond hopped on flight as soon as he heard the Red Sox would be playing. He went to Fenway Park, not giving anyone a heads up.

“When we landed in Boston, my wife cold-called the Fenway Park main number from the airport,” Diamond told the Red Sox’s site. “Luckily, the person who answered the phone believed her and we went to Fenway, where an escort brought us into the park and someone handed me a hot dog for breakfast.”

The impromptu trip paid off: “It was a very powerful moment with the audience joining in as one. There was a feeling of relief, unity, strength and love. I saw people in tears, people hugging. It was a moment that I will never forget.”

It also created a spike in sales for his song, all of which he donated to the charity, One Fund Boston. “It was just a natural reflex in a time of need,” he said. “It was obvious when I got there and met First Responders and some victims and family members that there was still a great need for help.”

The Kennedy-inspired song continues to work its power during the coronavirus pandemic, as Diamond performed a new version with modified lyrics, “Hands, washing hands/Don’t touch me, I won’t touch you.”

“The ‘Hands Washing Hands’ Sweet Caroline video was another spontaneous inspiration,” he told the Red Sox’s site. “The new lyrics lent themselves perfectly to the current situation and I hoped it would bring a little levity in such an uncertain time...It was gratifying to see how the song touched people in this time of social distancing and isolation. Hopefully, the magic of ‘Sweet Caroline’ will live on. I, for one, will never bet against that song.”

He’s always kept that promise — and also remained grateful to Kennedy for unknowingly sparking his most popular song. “It was a No. 1 record and probably is the biggest, most important song of my career,” he told AP. “And I have to thank her for the inspiration.”