Have you ever wondered what inspired the writers who penned the lyrics to our most famous patriotic songs? Or wrote the Pledge of Allegiance?

People seem to be the most familiar with “The Star Spangled Banner” origin story. Francis Scott Key, moved by seeing the American flag still flying after the British bombarded Ft. McHenry in the Baltimore Harbor during the War of 1812, wrote the poem on which it ‘s based. Before “The Star Spangled Banner” became our official National Anthem in 1931, “My Country Tis of Thee” and “America the Beautiful” were also frequently considered national anthems.

While an American victory in battle was the inspiration for Francis Scott Key to write “The Star Spangled Banner,” “America the Beautiful” and the Pledge of Allegiance, both written in 1893, were authored by people who were inspired to wave the flag for brotherhood and liberty and justice for all.

The lyrics to “America the Beautiful” come from a poem by Katharine Lee Bates, an English professor at Wellesley College who was also a social reformer. Published in her book “America the Beautiful and Other Poems,” the poem ends with a call to “crown thy good with brotherhood from sea to shining sea.” Her concept of brotherhood wasn’t confined to the United States. Other poems in the book express disdain for U.S. imperialism in the Philippines, condemning it as contrary to the American ideals of freedom and self-determination.

Bates was an outspoken defender of the rights of women, working people, minorities, and immigrants as well as an activist in the international peace movement that followed World War I. She opposed American isolationism and was involved in trying to establish the League of Nations.

Francis Bellamy, who wrote the Pledge of Allegiance, was of like mind. Bellamy was part of the Christian Socialist movement at the turn of the last century. He fervently believed in a social gospel inspired by the teachings of Jesus. Welcoming immigrants was part of that gospel.

When Bellamy took a job with The Youth’s Companion, a weekly magazine aimed at both children and adults, he was assigned to develop a patriotic program for Columbus Day that could be marketed to schools. Bellamy decided on a pledge that would be recited while children saluted the American flag. He thought the Pledge of Allegiance could help strengthen immigrant children’s identification with their new country and with America’s democratic values.

Bellamy, an ordained minister, didn’t put the words “under God” into the Pledge of Allegiance. Congress added them in 1954 as a kind of American rebuke to the “godless communism” of the Soviet Union.

“This Land is Your Land,” written by Woody Guthrie in 1939, was once such a popular patriotic song that it appeared in American school textbooks in the 1950s. A couple of verses — one about hungry people in a Depression relief line; another mocking a private property sign — were not included in the textbook version. However, Pete Seeger and Woody Guthrie’s son, Arlo, revived singing those verses at concerts in the 1960s. Seeger and Bruce Springsteen also sang a fulsome version of “This Land is Your Land” at the pre-inaugural concert when Barack Obama became president in 2009.

Written in 1984, Lee Greenwood’s “God Bless the U.S.A.” (“Proud to Be an American”) is a staple at 4th of July fireworks displays. After the September 11 attacks and the invasion of Iraq in 2003, its popularity soared. Known for its signature line, “at least I know I’m free,” it was frequently played at rallies of former President Donald J. Trump.

Patriotic songs strike emotional chords in people of all political persuasions. The question that often divides Americans is whether patriotism — in song and in everyday life — is mostly about celebrating personal freedom for ourselves and others like us or ensuring freedom and dignity for everyone.

I’m sure Woody Guthrie’s refrain, “this land was made for you and me,” means liberty and justice for all.