Key observed the British bombardment of Fort McHenry in 1814 during the War of 1812. He was inspired upon seeing the American flag still flying over the fort at dawn and wrote the poem "Defence of Fort M'Henry"; it was published within a week with the suggested tune of the popular song "To Anacreon in Heaven". The song with Key's lyrics became known as "The Star-Spangled Banner" and slowly gained in popularity as an unofficial anthem, finally achieving official status more than a century later under President Herbert Hoover as the national anthem.