The Battle of Baltimore was a combined sea/land battle fought between British and American forces in the War of 1812. It was one of the turning points of the war as American forces repulsed a sea invasion of the busy port city of Baltimore, Maryland, and on land killed the commander of the invading British army forces and repulsed the land invasion. The British fleet sailed away. The defense of Baltimore’s Fort McHenry in the battle inspired Francis Scott Key to compose the poem "The Star-Spangled Banner" which later became the national anthem of the United States of America.
With the recent defeat of Napoleon the previous year, thousands of British troops along with many seasoned officers, including Major General Robert Ross, were deployed to America to undertake a major campaign on America's East Coast. In August, 1814, British forces sailed from the Royal Naval Dockyard in Bermuda to attack the U.S. capital of Washington, D. C.. On August 24, the British Army had overrun confused American defenders at the Battle of Bladensburg and marched into Washington, which had been abandoned by the military. After burning and looting the White House, Capitol, Treasury, War Department and other public buildings and forcing the destruction of the Washington Navy Yard, the British carted public and private possessions back to their ships. President James Madison and the entire government fled the city; Madison wandered around Virginia and Maryland for several days. The British also sent a fleet up the Potomac to threaten the prosperous ports of Alexandria and Georgetown, which lie just west of Washington, and cut off Washington's water access. The mere appearance of the fleet cowed American defenders into fleeing from Fort Warburton without firing a shot, and undefended Alexandria surrendered. The British spent several days looting hundreds of tons of merchandise from city merchants, then turned their attention north to Baltimore, where they hoped to strike a knockout blow against the demoralized Americans. Baltimore was a busy port and was thought by the British to harbor many of the privateers who were raiding British shipping. The British planned a combined operation, with Major-General Robert Ross launching a land attack at North Point, and Vice-Admiral Sir Alexander Cochrane laying siege to Fort McHenry, which was the point defensive installation in Baltimore Harbor.
The British landed a force of 5,000 troops who marched toward Baltimore and first met heavy resistance at the Battle of North Point which was fought about 5 miles (8 km) from the city. The city’s defense was under the overall command of Major General Samuel Smith, an officer of the Maryland Militia. He dispatched roughly 3000 men under the command of General John Stricker to meet the British in a forward engagement. General Stricker was to stall the British invasion force in order to delay the British advance long enough for Major General Smith to complete the defences in Baltimore. The land invasion force for the British was led by Robert Ross, who had ordered the burning of the White House, and would be killed in the second shift of the American defense by an American sharpshooter whose name has been lost to history. However, Daniel Wells, age 19, and Henry McComas, age 18, of Captain Aisquith's rifle company of the 5th Maryland Militia regiment have been attributed by Baltimore legend to have been responsible for his death, which was immediately followed by their own. With Ross' death the British army came under the command of the less competent Colonel Authur Brooke.
Rodgers Bastion, located on Hampstead Hill (now part of Patterson Park), was the centerpiece of a 3-mile-wide earthworks from the outer harbor in Canton, north to Belair Road, dug to defend the eastern approach to Baltimore against the British. The redoubt was assembled and commanded by U.S. Navy Commodore John Rodgers, with General Smith in command of the overall line. At dawn on September 13, 1814, the day after the Battle of North Point, some 4,300 British troops advanced north on North Point Road, then west along the Philadelphia Road (now Pulaski Highway) toward Baltimore, forcing U.S. troops to retreat to the defensive line. British commander Col. Arthur Brooke established his new headquarters at the Sterret House on Surrey Farm (today called Armistead Gardens), about 2 miles east-northeast of Hampstead Hill.
When the British began probing actions, the American line was defended by 100 cannon and more than 10,000 troops, including two shadowing infantry regiments commanded by general officers Stricker and Winder. The defenses were far stronger than the British anticipated, the U.S. defenders at Fort McHenry successfully stopped British naval forces from advancing close enough to provide artillery support, and Brooke's attempts to flank right were successfully countered by the Americans. Thus Brooke decided the land campaign was a lost cause, and, at 3am on September 14, 1814, ordered the British retreat back to the ships.   
At Fort McHenry, some 1,000 soldiers under the command of Major George Armistead awaited the British naval bombardment. Their defense was augmented by the sinking of a line of American merchant ships at the adjacent entrance to Baltimore Harbor in order to further thwart the passage of British ships.
The attack began on September 13, as the British fleet of some nineteen ships began pounding the fort with Congreve rockets (from rocket vessel HMS Erebus) and mortar shells (from bomb vessels Terror, Volcano, Meteor, Devastation, and Aetna). After an initial exchange of fire, the British fleet withdrew to just beyond the range of Fort McHenry’s cannons and continued to bombard the American redoubts for the next 25 hours. Although 1,500 to 1,800 cannonballs were launched at the fort, damage was light due to recent fortification that had been completed prior to the battle.
After nightfall, Cochrane ordered a landing to be made by small boats to the shore just west of the fort, away from the harbor opening on which the fort’s defense was concentrated. He hoped that the landing party might slip past Fort McHenry and draw Smith’s army away from the main British land assault on the city’s eastern border. Operating in darkness and in foul weather, Armistead's guns opened fire onto the landing party and the diversionary attack failed. On the morning of September 14, the × 42 ft oversized American flag, which had been made a few months before by local flagmaker Mary Pickersgill and her 13-year-old daughter, was raised over Fort McHenry (replacing the tattered storm flag which had flown during battle).
Brooke had been instructed not to attack the American positions around Baltimore unless he was certain they could be taken. Seeing that Cochrane had failed to subdue the fort and that he was heavily outnumbered by the American regulars and militia, Brooke withdrew from his positions, and returned to the fleet which would set sail for New Orleans.
An American lawyer and amateur poet, Francis Scott Key, was on a mercy mission for the release of Dr. William Beanes, a prisoner of the British. Key showed the British letters from wounded British officers praising the care they received from Dr. Beanes. The British agreed to release Beanes, but Key and Beanes were forced to stay with the British until the attack on Baltimore was over. Key watched the proceedings from a truce ship in the Patapsco River. On the morning of the 14th, Key saw the American flag waving above Fort McHenry. Inspired, he began jotting down verses on the back of a letter he was carrying. He composed the words to the tune of an old British drinking song, "To Anacreon in Heaven." When Key reached Baltimore, his poem was printed on pamphlets by the Baltimore American. His poem was originally called "Defense of Ft. McHenry." The song eventually became known as "The Star-Spangled Banner." Congress made it the national anthem in 1931.
Colonel Brooke’s troops withdrew, and Admiral Cochrane’s fleet sailed off to regroup before his next assault on the United States, the Battle of New Orleans. Armistead was soon promoted to lieutenant colonel. Much weakened by the arduous preparations for the battle, he died at age 38, only three years after the battle.
The battle is commemorated in the Fort McHenry National Monument and Historic Shrine.