By: History.com Editors

The Star-Spangled Banner

Old GloryAn American flag, US, circa 1985. (Photo by Alfred Gescheidt/Getty Images)

Alfred Gescheidt/Getty Images

Published: September 28, 2017

Last Updated: February 27, 2025

“The Star-Spangled Banner” is the national anthem of the United States. By the time the song officially became the country’s anthem in 1931, it had been one of America’s most popular patriotic tunes for more than a century. The anthem’s history began the morning of September 14, 1814, when an attorney and amateur poet named Francis Scott Key watched U.S. soldiers—who were under bombardment from British naval forces during the War of 1812—raise a large American flag over Fort McHenry in Baltimore, Maryland.

Background: War of 1812

War of 1812

James Madison is considered to be the "Father of the Constitution," but it was the War of 1812 that ultimately defined his presidency.

Simmering anger at Britain for interfering in American trade, impressing U.S. sailors into the Royal Navy and standing in the way of westward expansion led the United States to declare war in June 1812.

With British forces distracted by the country’s ongoing war with France, the United States scored some encouraging early victories in the War of 1812. But in August 1814, British troops invaded Washington, D.C. and set fire to the White House, the Capitol and other government buildings. The Royal Navy then trained its sights on the key seaport of Baltimore, Maryland.

On September 13, U.S. soldiers at Baltimore’s Fort McHenry withstood some 25 hours of British bombardment. Early the next morning, they hoisted a gigantic U.S. flag over the fort, marking a crucial victory and a turning point in what would be considered a second war of American independence.

Francis Scott Key

A Maryland-born attorney with a thriving practice in Washington, D.C., Francis Scott Key watched the bombardment of Fort McHenry from a ship anchored in Baltimore’s harbor.

Key had been helping to negotiate the release of an American civilian, Dr. William Beanes, who had been captured in an earlier battle. As a condition of the release, the British ordered the Americans not to return to shore during the attack on Baltimore.

Who Wrote 'The Star-Spangled Banner'?

The Star-Spangled Banner

In this This Day in History video, the 9/13/1814 writing of the Star Spangled Banner by Francis Scott Key is recounted. It was inspired by the British bombing of Ft. McHenry during the War of 1812.

Francis Scott Key wrote “The Star Spangled Banner” and its initial verse on the back side of a letter while watching the large American flag waving over the fort that morning. Back in Baltimore, he continued working until he had completed four verses (only one of which is commonly known today).

After a local printer issued the song, originally called “Defence of Fort M’Henry,” two Baltimore newspapers printed it, and it spread quickly to various cities along the East Coast.

By November 1814, Key’s composition had appeared in print for the first time under the name “The Star-Spangled Banner.”

From Drinking Song to American Anthem

Ironically, the melody Key assigned to accompany the lyrics of “The Star-Spangled Banner” was a popular English drinking song called “To Anacreon in Heaven.”

Written around 1775 by John Stafford Smith, the song honored the ancient Greek poet Anacreon, a lover of wine. It was originally performed at a London gentleman’s music club called the Anacreontic Society.

John Adams

Find out about John Adams' political career in the newly formed United States, from his vice presidency under George Washington to his rocky term as America's chief executive.

The Anacreontic Song, as it was known, had a track record of popularity in the United States by 1814. In one famous case, defenders of the embattled second president, John Adams, used the tune for a song called “Adams and Liberty.”

Key himself had even used the tune before, as accompaniment for verses he wrote in 1805 commemorating American naval victories in the Barbary War.

Key’s Complicated Legacy

After the war of 1812, Key continued his thriving law career. He served as a member of the “Kitchen Cabinet” of President Andrew Jackson and in 1833 was appointed as a U.S. attorney for the District of Columbia.

He composed other verses over the course of his life, but none received anywhere close to the recognition of “The Star-Spangled Banner.” After contracting pleurisy, Key died in 1843 at the age of 63.

Though his celebrated anthem proclaimed the United States “the land of the free,” Key was in fact a slaveholder from an old Maryland plantation family, and as a U.S. attorney argued several prominent cases against the abolitionist movement. He did speak out against the cruelties of the institution of slavery, but did not see abolition as the solution.

Instead, Key became a leader of the colonization movement, which advocated the relocation of black slaves to Africa and eventually resulted in the modern nation of Liberia.

Growing Popularity of 'The Star-Spangled Banner'

American Civil War History

If you had just one word to describe the Civil War, what would it be?

At first, “The Star-Spangled Banner” trailed “Yankee Doodle” and “Hail Columbia” in popularity among patriotic 19th-century tunes. But during and immediately after the Civil War, Key’s song gained a deeper meaning, as the American flag became an increasingly powerful symbol of national unity.

By the 1890s, the U.S military had adopted the song for ceremonial purposes, playing it to accompany the raising and lowering of the colors. In 1916, President Woodrow Wilson signed an executive order designating it “the national anthem of the United States.”

In 1931—more than 100 years after it was composed—Congress passed a measure declaring “The Star-Spangled Banner” as the official national anthem.

History of the National Anthem at Sporting Events

“The Star-Spangled Banner” made its sporting-event debut in September 1918, during that year’s first World Series game between the Chicago Cubs and Boston Red Sox.

In addition to the ongoing toll of World War I, a cloud of violence hung over Chicago’s Comiskey Park, as a bomb had torn apart the Chicago Federal Building just the day before. During the seventh-inning stretch, the military band on hand struck up “The Star-Spangled Banner,” and in a moving spectacle, players and fans alike fell silent and saluted the flag.

The practice soon spread across major league baseball, and into other sports, and eventually became a widely accepted pregame tradition.

While many view the playing of “The Star-Spangled Banner” before sporting events as an important patriotic ritual, over the years some athletes have chosen to protest enduring racial injustices in American society by turning their backs on the flag, refusing to stand or taking a knee while the national anthem is performed.

Sources

The Star-Spangled Banner, Smithsonian.
“Star-Spangled Banner” writer had complex history on race, The Baltimore Sun.
“How the national anthem—and subverting it—became a national tradition,” The Washington Post.
“How the National Anthem Has Unfurled,” The New York Times.
“The Song Remains the Same,” ESPN the Magazine.

Related Articles

About the author

HISTORY.com works with a wide range of writers and editors to create accurate and informative content. All articles are regularly reviewed and updated by the HISTORY.com team. Articles with the “HISTORY.com Editors” byline have been written or edited by the HISTORY.com editors, including Amanda Onion, Missy Sullivan, Matt Mullen and Christian Zapata.

Fact Check

We strive for accuracy and fairness. But if you see something that doesn't look right, click here to contact us! HISTORY reviews and updates its content regularly to ensure it is complete and accurate.

Citation Information

Article title
The Star-Spangled Banner
Website Name
History
Date Accessed
March 21, 2025
Publisher
A&E Television Networks
Last Updated
February 27, 2025
Original Published Date
September 28, 2017

History Revealed

Sign up for "Inside History"

Get fascinating history stories twice a week that connect the past with today’s world, plus an in-depth exploration every Friday.

By submitting your information, you agree to receive emails from HISTORY and A+E Global Media. You can opt out at any time. You must be 16 years or older and a resident of the United States.

King Tut's gold mask