"The Star-Spangled Banner" is the national anthem of the United States. The lyrics come from the "Defence of Fort M'Henry", a poem written on September 14, 1814, by 35-year-old lawyer and amateur poet Francis Scott Key after witnessing the bombardment of Fort McHenry by British ships of the Royal Navy in Outer Baltimore Harbor in the Patapsco River during the Battle of Baltimore in the War of 1812. Key was inspired by the large U.S. flag, with 15 stars and 15 stripes, known as the Star-Spangled Banner, flying triumphantly above the fort during the U.S. victory. The poem was set to the tune of a popular British song written by John Stafford Smith for the Anacreontic Society, a men's social club in London. "To Anacreon in Heaven" (or "The Anacreontic Song"), with various lyrics, was already popular in the United States. This setting, renamed "The Star-Spangled Banner", soon became a well-known U.S. patriotic song. With a range of 19 semitones, it is known for being very difficult to sing. Although the poem has four stanzas, only the first is commonly sung today. "The Star-Spangled Banner" was first recognized for official use by the U.S. Navy in 1889. On March 3, 1931, the U.S. Congress passed a joint resolution () making the song the official national anthem of the United States, which President Herbert Hoover signed into law. The resolution is now codified at . Following the Burning of Washington and the Raid on Alexandria, Dr William Beanes, the elderly and popular town physician of Upper Marlboro and a friend of Key, had been captured in his home on August 28, 1814. Beanes was accused of aiding the arrest of some British soldiers (stragglers withdrawing after the Washington campaign) who were pillaging homes. On September 2, 1814, from his home in Georgetown, F. S. Key wrote to his parents. The letter to his mother ended with: I am going in the morning to Balt[imore] to proceed in a flag-vessel to Genl Ross. Old Dr Beanes of Marlbro' is taken prisoner by the Enemy, who threaten to carry him off – Some of his friends have urged me to apply for a flag & go & try to procure his release.