On September 13 of 1814, Francis Scott Key wrote a poem to commemorate the sight of a lone U.S. flag he witnessed flying over Fort McHenry while it was under attack by the British during the War of 1812. Francis Scott Key had a high personal stake in the successful defense of Fort McHenry. He had been able to negotiate the release of his friend Dr. William Beanes from British captivity in nearby Baltimore. However, they were not allowed to leave until after the attack on Fort McHenry had failed. The resulting poem was originally called "The Defence of Fort McHenry" and it was later set to the music of a popular English drinking tune called "To Anacreon in Heaven" by composer John Stafford Smith. It was printed in newspapers and eventually people began to refer to it as "The Star Spangled Banner." It was adopted as the U.S. national anthem in 1931.