Billy Joel didn't want to write "The River of Dreams." He fought in vain to resist the pull of the future hit as it flooded his subconscious and held his thoughts captive.

It came to him, fittingly, in a dream. "I woke up one day and I just had this idea, and it was fully realized in my mind, the melodic and the chord idea," Joel said in the 1993 Shades of Grey documentary. "I don't know why it kept coming back to me. It was so strong that I had to flesh this thing out."

Even though the song's memorable refrain ("In the middle of the, I go walking in the ... ") came to Joel fully formed, he balked at the idea initially. "It was kind of like a gospel song. I said, ‘I can't write this. I'm not a gospel artist. And I tried to shake it off," he explained in 2012.

Finally, the obstinate songwriter let down his defenses and committed to following his muse. It happened, as many great ideas do when he took a shower.

"I got in the shower that morning … and it would not go away," Joel said. "I could not shake it. I said, 'Don't write this song. I don't wanna write this song. I'm not gonna write this song.' ... And that's it. If you get it in the shower and it becomes an earworm, forget it. You're not gonna shake it off. It's not gonna go away."

Watch Billy Joel's 'The River of Dreams' Video

"The River of Dreams" was "really a play on the phrase 'stream of consciousness,'" Joel explained. "There are biblical phrases in there, evocations of baptism and resurrection, and a great deal of symbolism in the river and seas. I'm always using water as a metaphor."

It was a fitting title track and raison d'etre for River of Dreams, Joel's 12th and final album of pop-rock material. (He released his final studio LP, Fantasies & Delusions, comprising classical piano compositions, in 2001.) Far from the glossy, blockbuster pop smashes of his '80s output, River of Dreams presented a 10-song cycle bristling with discontent and spiritual yearning. It found the 44-year-old Joel struggling to reconcile his turbulent, indulgent youth with his impending middle age.

"For an insecure guy like me, it was scary," Joel told the Los Angeles Times of turning 40. "Things change for a performer at that age. The younger audience sees you differently. The older fans may drift away from pop music. Will they still like you? You don't know. Then I'm also going through changes and re-evaluating what I do. What's OK for a 30-year-old to sing about isn't always OK for someone older. You have to get a handle on being 40. It's a different state. I'm still learning how to be in my 40s."

Joel needn't have worried about his audience taking the ride with him. "The River of Dreams," released the album's lead single on July 19, 1993, reached No. 3 on the Billboard Hot 100 — his biggest hit since 1989's chart-topping "We Didn't Start the Fire — and helped push its namesake LP to five-times platinum status in the United States.

Decades later, Joel confessed he was still trying to wrap his head around the song. "I still don’t know what it means," he said. "But it was very strong visual images: through the valley of fear, the desert of truth, baptized by the whatever it was. I'm not a biblical person, I'm not a religious guy, but these images were very strong, and it was the reason I wrote it. Haven't figured it out, but it became a hit record."

Billy Joel Albums Ranked

From 'Cold Spring Harbor' to 'River of Dreams,' we run through the Piano Man's LPs from worst to best.

More From 103.7 The Hawk