It's one of the most famous songs of the 20th century and an anthem that, to this day, still ends the main set of Paul McCartney's concerts. On July 29, 1968, the Beatles began recording 'Hey Jude,' a process that would take one week and two studios to complete.

As the Beatles' musical ambitions grew, so did their recording sessions. Five years earlier, they banged out most of their debut album, 'Please Please Me,' in less than 12 hours. Now they had their label's blessing to take as much time as they needed. No longer restricted to EMI's rigid three-hour sessions, they could begin in the evening and work into the wee hours of the morning.

The song's origin is a large part of its perpetual appeal. When John Lennon was breaking up with his first wife, Cynthia, McCartney visited her and son Julian, who was five, to see how they were doing. On the drive out to Weybridge, McCartney wrote 'Hey Jools' to cheer up Julian. He later revised the song, changing its title.

According to Mark Lewisohn's invaluable book ‘The Beatles Recording Sessions: The Official Abbey Road Studio Session Notes, 1962 – 1970,’ the band spent two days at Abbey Road's Studio Two rehearsing 'Hey Jude.' Part of the session from the second day was filmed for a documentary by the National Music Council of Great Britain called 'Music!' A rough mix was made of the song so that producer George Martin could write an orchestral score for it.

On July 31, the group left Abbey Road, which was still equipped with only a four-track deck, for one of the few times in their history and went to the new Trident Studios, which had an eight-track machine. Although they recorded four takes, they decided the first one of the day was the best and began overdubbing.

'Hey Jude,' as we know it, came together the next day, with the bass and final vocals coming in the afternoon and a 36-piece orchestra recorded in the evening. At the Beatles' request, many of the musicians stayed well into the morning to add hand claps and background vocals to the coda, although one musician claimed to have said that he didn't want to "clap [his] hands and sing on Paul McCartney's bloody song."

Within a week, mono and stereo mixes were made. Listen closely at the 2:59 mark, and you can hear somebody -- it's hard to tell who -- say 'f---ing hell!' Stories vary on its origin; either it was McCartney's response to a blown note on the piano or the volume in Lennon's headphones was too loud. Whatever the case, the obscenity was left in, but buried deep enough in the mix so that it's not easily discerned.

Despite the bad word, and the song's 7:11 running time (which was unprecedented for a single), 'Hey Jude' became a smash hit upon its worldwide release -- the first on the Beatles' new Apple label -- at the end of August. It stayed at No. 1 in the U.S. for nine weeks, tying a record at the time. And unlike many artists, who often used the B-side for throwaway tracks to guarantee that disc jockeys would play the A-side, the Beatles put another anthem on the flip, 'Revolution.'

More From Q 105.7