Fifty years ago this month, America was in turmoil and looking to make things better.

On August 26, 1968, the same day that the Democratic National Convention opened, the Beatles released their mega-hit, “Hey Jude.” With its encouraging message, it offered reassurance to millions and became a musical unifier for people around the world.

Written by Paul McCartney with input from John Lennon, “Hey Jude” is one of the most recognized songs in rock and roll history.

Chachi Loprete, Beatles aficionado and long-time host of the Boston-based radio show "Breakfast with the Beatles," says McCartney wrote the song for John and Cynthia Lennon’s son, Julian, who was upset about his parents' divorce, after Lennon had a public affair with Yoko Ono.

“He wanted to write a song to Julian to give him some uplifting moments of hope that things weren’t so bad, that life will get better,” says Loprete.

Loprete says John Lennon thought the song was about him, telling him, “You can leave Cynthia, and you can go marry Yoko.”

But the song was about Lennon’s son, and it was originally called "Hey Jules," says Loprete. That didn't work well musically, so McCartney changed it to Jude, and the name stuck. "Hey Jude" was the first record released on the Beatles' own label, Apple Records. It sold five million copies in the first six months of its release and became the number one song in 12 countries.

The song’s length is unusual — it goes on for 7 minutes and 11 seconds. After the fourth verse, it shifts to a fade-out coda that lasts four minutes.

“It’s of an epic length," says David Gallant, who teaches a course on the Beatles at Suffolk University. "It helped it make its mark. It gives you time to get into it.”

Initially, band-mates wanted to make musical changes, but McCartney stood his ground.

“Paul felt one line didn’t make sense: 'The movement you need is on your shoulders,'" says Loprete. “And John says, 'No, you’re going to use that line. That’s the best line in the song.'”

Lennon is often quoted as saying that "Hey Jude" is one of McCartney's "masterpieces." And Lennon thought that the song was about him is an example of the song's universality. Though written for one person, it resonates broadly.