Battle of Baltimore Navy inspired Francis Scott Key to compose the poem "Defence of Fort McHenry", which later became the lyrics for "The Star-Spangled Banner", the national anthem of the United States of America. Future President James Buchanan served as Private in the defense of Baltimore. Until April 1814, Great Britain was at war with Napoleonic France, which limited British war aims in America. During this time the British primarily used a defensive strategy and repelled American invasions of the provinces of Upper and Lower Canada. However, the Americans gained naval control over Lake Erie in 1813, and seized parts of western Ontario.
The Star-Spangled Banner 1889, and by U.S. President Woodrow Wilson in 1916, and was made the national anthem by a congressional resolution on March 3, 1931 (46 Stat. 1508, codified at ), which was signed by President Herbert Hoover. Before 1931, other songs served as the hymns of U.S. officialdom. "Hail, Columbia" served this purpose at official functions for most of the 19th century. "My Country, 'Tis of Thee", whose melody is identical to "God Save the Queen", the United Kingdom's national anthem, also served as a "de facto" national anthem. Following the War of 1812 and subsequent U.S. wars, other songs emerged