This Fourth of July marks the 100th birthday of America’s unofficial national anthem, “God Bless America,” written by immigrant Irving Berlin in the same year he became a U.S. citizen.

Berlin, born Israel Beilin in Russia, fled religious persecution in 1893 when he was 5.

Entering America for the first time, according to The New York Times, he was placed in a holding pen with his brother and sisters, while immigration officials decided their fate.

Twenty-five years later, he would write the fabled tune based on a phrase his mother would say. Berlin noted that although his family was poor, his mother exclaimed, “God Bless America,” with emotion that “was almost exaltation,” The Times reported.

According to the Library of Congress, Berlin wrote “God Bless America” as a “peace song” in response to the “fascism and war threaten[ing] Europe” in 1938. “God Bless America” debuted on Nov. 10, 1938, to commemorate Armistice Day, and the revenues for the song went to the Boy Scouts and the Girl Scouts of America.

The Times reported that the song was originally conceived by Berlin for a soldier show as a fundraiser, when he was an Army private at Camp Upton in Yaphank, N.Y., in February 1918.

He rediscovered the song two decades later and gave a revised version to the radio star Kate Smith, who sang it weekly.

The song gained popularity, quite quickly.

In 1938, Berlin led a crowd singing the song, The Times said, after a speech against bigotry by Eleanor Roosevelt, in which she warned, “Fear arising from intolerance and injustice constitutes the chief danger to our country.”

As the song has aged, its meaning and ideology have changed.

Often sung during citizenship and naturalization ceremonies, it has been welcomed but also has faced backlash.

Woody Guthrie’s “God Blessed America For Me” was an angry protest against the complacency he found in Berlin’s lyrics, The Times reported. Guthrie soon changed the chorus to “This Land Is Your Land.”

In modern times, the song became a symbol of collective unity in the aftermath of the Sept. 11 terrorist attacks, The Times said, sung everywhere from memorials at the Capitol and neighborhood candlelight vigils to Broadway theaters and professional baseball games.

Regardless of the song’s politics, its original intent was gratitude.

“It was the land he loved. It was his home sweet home. He, the immigrant who had made good, was saying thank you,” his daughter Mary Ellin Barrett wrote about her father’s song.