American patriotic music is a part of the culture and history of the United States since its founding in the 18th century and has served to encourage feelings of honor for the country's forefathers and for national unity. These songs include hymns, military themes, national songs, and music from stage and screen, as well as songs adapted from poems. Much of American patriotic music owes its origins to six main wars—the American Revolution, the American Indian Wars, the War of 1812, the Mexican–American War, the American Civil War, and the Spanish–American War. During the period prior to American independence, much of America's patriotic music was aligned with the political ambitions of the British in the new land and so several songs are tied with the country's British origin.
"The Liberty Song", written by Founding Father John Dickinson in 1768 to the music of William Boyce's "Heart of Oak", is perhaps the first patriotic song written in America. The song contains the line "by uniting we stand, by dividing we fall", which was an overture to the feelings of common blood and origin the Americans had whilst fighting the French and Indian War, and is also the first recorded use of the sentiment. Additionally, other songs gained prominence in keeping with British and American unity namely "The British Grenadiers," and "God Save the King". However, with the War of Independence the tunes of the last two were combined with new words while "Yankee Doodle", long a tune and lyric addressed to the unique American population descended from the British became widely popular. Political and cultural links between the colony and Great Britain can perhaps explain the ongoing popularity of the two former tunes, despite the war for independence.