"The Star-Spangled Banner," like many other well-known melodies, began as a poem named "The Defence of Fort McHenry." Francis Scott Key wrote it in 1814 during the War of 1812. The last stanzas describe the Battle of Baltimore, a two-day siege between British and American soldiers. It is now known as the first national anthem because it was soon adopted by all sides in the war. Key had been hired as a clerk by the secretary of the military department for Baltimore City. When the city fell into British hands during the invasion, he rushed to Washington, D.C. to ask for permission to write a poem about their plight. President James Madison approved the poem (now called "The Defence of Fort McHenry") and ordered that it be set to music quickly so that troops could be inspired by its words. The song was completed within days of the attack on Baltimore and was first sung by a group of musicians under the command of William W. Wood. They were members of the 6th U.S. Infantry Regiment stationed at Fort McHenry in Maryland. The melody is based on a local African American church tune called "To Anacreon in Heaven." Today this song is often used as an unofficial national anthem. But at the time it was written, it was not intended to be more than a plea for help during a terrible crisis.