Only an icon with Garland in her name could have pulled off this Christmas song miracle. Before Judy Garland crooned the melancholy-tinged lyrics to the now-classic holiday tune “Have Yourself a Merry Little Christmas” in her 1944 musical film Meet Me in St. Louis, she made her wish list crystal clear.

Even before the Academy Award nominee got involved, however, the beloved Christmas song almost never came to light at all. During a 1989 interview with NPR's Terry Gross, late songwriters Hugh Martin and Ralph Blaine described not being able to make the carol's "madrigal-like tune" work, and, after a few days of trying to no avail, Martin said he "threw it in the wastebasket."

Something apparently told Blaine that there was still some lingering Christmas magic, however. "We dug around the wastebasket and found it," Blaine recounted to Gross. "Thank the Lord we found it."

Even with the salvaged melody, the men's first draft was deemed a bit too blue for Christmas, added Martin: "The [film producers] said, 'No, no — it's a sad scene, but we want sort of an upbeat song, which will make it even sadder if she's smiling through her tears."

READ MORE: Judy Garland Was Put on a Strict Diet and Encouraged to Take "Pep Pills" While Filming The Wizard of Oz

Garland thought the song was too sad

In the movie, Garland's Esther Smith sings "Have Yourself a Merry Little Christmas" after returning home from a Christmas Eve ball and find her brokenhearted young sister Tootie (Margaret O'Brien) grappling with the family's impending post-holiday move, which was about to force them to leave behind their happy life in titular St. Louis for unknown territory in New York.

Citing her 6-year-old costar, Garland herself was vocal about the "lugubrious" original version and even "refused to sing it," Martin also later recalled.

"She said, 'If I sing that, little Margaret will cry and they'll think I'm a monster,'" he shared. "So I was young then and kind of arrogant, and I said, 'Well, I'm sorry you don't like it, Judy, but that's the way it is, and I don't really want to write a new lyric.'"

In the original, slightly more depressing draft, Garland would have sung the following lyrics, for example:

"Have yourself a merry little Christmas / It may be your last / Next year we may all be living in the past / Have yourself a merry little Christmas / Pop that champagne cork / Next year we may all be living in New York... No good times like the olden days / Happy golden days of yore / Faithful friends who were dear to us / Will be near to us no more."

Luckily, Meet Me in St. Louis actor Tom Drake, who played Garland's onscreen love interest, "boy next door" John Truett, took Martin aside and assured him he'd "be sorry" if he didn't finish the song. And so Martin made some revisions, and the following version made it into the movie's final cut, instead:

"Have yourself a merry little Christmas / Let your heart be light / Next year all our troubles will be out of sight / Have yourself a merry little Christmas / Make the yuletide gay / Next year all our troubles will be miles away"

While the difference was clear, the song still didn't exactly have a merrymaking effect in the movie, with a tearful, nightgown-clad Tootie responding by going out into the snow and destroying the snowmen in the family's yard. Even so, Garland certainly wasn't considered a "monster" as she had initially feared. In fact, the song, which Garland also released as a single, especially resonated with American troops serving overseas. She even famously performed an emotional rendition of “Have Yourself a Merry Little Christmas” for deploying World War II soldiers at the Hollywood Canteen in 1943.

READ MORE: Judy Garland's Life Was in a Downward Spiral Before Her 1969 Death

Even after appearing in the movie, the lyrics changed again

Garland's wasn't the only update to the song, which has been covered countless times by numerous artists following its initial release, however. At the request of Frank Sinatra in 1957, Martin once again "cheered up" the lyrics for Old Blue Eyes' Christmas LP that year.

As Martin told Entertainment Weekly, Sinatra called him and expressed his issues with the line (that did still appear in Meet Me in St. Louis), "Until then we'll have to muddle through somehow." According to the songwriter, Sinatra told him, “The name of my album is A Jolly Christmas. Do you think you could jolly up that line for me?”

In the end, Martin swapped out that particular lyric for the now-standard, "So hang a shining star upon the highest bough." (For her part, Garland even adopted that version in her own subsequent performances of the tune.)

While "Have Yourself a Merry Little Christmas" did endure some edits over the years, it has long since earned its place in the canon of holiday classics that will forever be sung — without fail — every December. And the song is certainly much merrier now.