On September 7, 1814, Francis Scott Key was onboard a British warship seeking the release of an American prisoner, when he observed the British attack on Fort McHenry at Baltimore, Maryland. Impressed that the fort held out against the British fleet, Key penned a poem, Defence of Fort McHenry, which was published on September 17, 1814 and quickly became very popular when sung to an old British drinking tune by John Stafford Smith. In 1931 it was declared the national anthem by Congress.