By the Dawn's Early Light

The war of 1812 is sometimes called, "The Second War of Independence". It has also been called, "The War of Faulty Communications". It started after Great Britain had promised to repeal the laws that caused the conflict, and the greatest loss of lives was in the last battle fought two weeks after a peace treaty was signed.
The recently born United States consisted of only 17 states at the start of the war of 1812. The main factor triggering the war was the capture of American trading vessels by the British fleet and impressment of American sailors into service on British ships in Great Britain's war with Napoleon of France. This caused President James Madison to ask the Congress to declare war on Great Britain, which they did on June 18, 1812. Other motivations to the war were territorial. The British were supplying arms through Canadian bases to the Indians fighting United States expansion to the west. After war was declared, the United States hoped to force Great Britain out of Canada. The southeast United States also coveted the area of Florida, which was owned by Spain, an ally of Great Britain. After the war, the United States purchased the Florida territory from Spain, and Canadian borders were restored to prewar status.
For two years, Great Britain treated the war as an annoyance because their main forces were occupied in the war with Napoleon. When Napoleon was defeated in 1814, Great Britain launched a major campaign against the United States with "the intention of giving the upstart nation a real drubbing". They landed a force of 5000 soldiers in Chesapeake Bay with orders to march on Washington and burn all the Federal buildings, which they did. The British forces then turned on Baltimore.
Fort McHenry overlooked access to the ports of Baltimore and was key to capture of the city. The British had taken as prisoner a Doctor Beanes of Baltimore and held him aboard one of their ships. Before the British assault against Fort McHenry, Francis Scott Key, a poet and lawyer of Baltimore, had obtained permission from Secretary Monroe to seek the release of Doctor Beanes. He was able to do so, but they were both detained aboard a British truce ship stationed four miles offshore to prevent them from warning Baltimore of the impending attack. Over a 25-hour period, the British fleet, from two miles offshore, fired about 1500 bombs and several hundred rockets at the Fort. Francis Scott Key knew that if Fort McHenry fell, Baltimore was likely to fall, which could mean the loss of American independence.
He paced the deck of the truce ship nervously all day and all night as the Fort was assaulted by the British. At dawn on September 14, 1812, he peered through a telescope and saw the huge American flag still flying. This flag, measuring 30 by 42 feet, was made especially for Fort McHenry in anticipation of the battle "so it could be seen from great distance'. The British commander knew it was futile to continue the assault. He recalled his troops and sailed away. Francis Scott Key was so moved by this dramatic moment he sat down and wrote a poem honoring the few brave men who defended Fort McHenry. His poem became our national anthem, "The Star Spangled Banner".