During the War of 1812, 35-year-old Francis Scott Key, a lawyer and amateur poet, met with British military leaders aboard the British ship HMS Tonnant to plead for the release of a close friend who had been taken prisoner. Unfortunately, Key overheard certain details of the British plans for an impending attack on Baltimore. The British decided to hold him captive until after the battle.
As a temporary prisoner, Key could do nothing but watch the American forces at Fort McHenry be bombarded by the British on the night of September 13, 1814. Throughout the night, he saw that the fort’s small storm flag continued to fly. Although the British bombed the fort for 25 hours, they weren’t able to destroy it.
When the smoke cleared in the morning, Key looked toward Fort McHenry to see if the flag was still there. He was overjoyed to see that the smaller storm flag had been replaced with a larger American flag, which was still triumphantly waving.
Surprised and inspired by the sight of the American flag still flying above the fort, Key began writing a poem called “Defence of Fort McHenry” on the morning of September 14. He scribbled the first verses on the back of an envelope. After returning to Baltimore, he finished the poem in his room at the Indian Queen Hotel on September 16.
He then showed his poem to his brother-in-law, Judge Joseph H. Nicholson. Nicholson recommended putting the words to the tune of “The Anacreontic Song,” also called “To Anacreon in Heaven,” a popular British song composed by John Stafford Smith.
On September 20, 1814, the Baltimore Patriot and The American printed the song. Soon afterward, Thomas Carr, the owner of a music store in Baltimore, published the words and music together with the name "The Star-Spangled Banner."
Although “The Star-Spangled Banner” quickly became popular with Americans, it did not receive official recognition as the national anthem until many years later. In 1916, President Woodrow Wilson ordered that it be played at all military functions.
On March 3, 1931, President Herbert Hoover signed a law that made “The Star-Spangled Banner” the official national anthem of the United States. Some people celebrate March 3 each year as unofficial National Anthem Day.
The song is known for being difficult to sing because of its wide range — an octave and a half. Singers have also been known to forget the words occasionally, which has led some to choose to prerecord and lip-sync the song rather than perform it live.
It has become a longstanding tradition to play “The Star-Spangled Banner" at the beginning of public sports events and other public gatherings in the United States.