The 5-year-old and his family had traveled thousands of miles to escape. When they finally arrived on American soil, free from the marauders who had burned their house to the ground, the boy was placed in a holding pen with his brother and sisters, while immigration officials decided their fate.

From this story, a classic piece of music emerged. The family, fleeing religious persecution in Russia in 1893, was soon reunited and allowed to enter the country. And that little boy, born Israel Beilin, would grow up to become Irving Berlin. Twenty-five years after emigrating, the same year he became an American citizen, he composed “God Bless America.”

The song, which rings out with special fervor each Fourth of July as a kind of unofficial national anthem, is turning 100 this year, and at a fraught moment in America’s relations with would-be immigrants, it is worth remembering its origins. Berlin said he first heard the title phrase from his mother, who frequently spoke the words with an emotion he later said “was almost exaltation,” despite their poverty. His daughter Mary Ellin Barrett later wrote that Berlin meant every word: “It was the land he loved. It was his home sweet home. He, the immigrant who had made good, was saying thank you.”