<Li> Action of 9 May 1814 </Li> <P> The War of 1812 (1812--1815) was a conflict fought between the United States, the United Kingdom, and their respective allies . Historians in Britain often see it as a minor theatre of the Napoleonic Wars; in the United States and Canada, it is seen as a war in its own right . </P> <P> Since the outbreak of war with Napoleonic France, Britain had enforced a naval blockade to choke off neutral trade to France, which the United States contested as illegal under international law . To man the blockade, Britain impressed American merchant sailors into the Royal Navy . Incidents such as the Chesapeake--Leopard Affair inflamed anti-British sentiment . In 1811, the British were in turn outraged by the Little Belt Affair, in which 11 British sailors died . The British supplied Indians who conducted raids on American settlers on the frontier, which hindered American expansion and also provoked resentment . Historians remain divided on whether the desire to annex some or all of British North America contributed to the American decision to go to war . On June 18, 1812, President James Madison, after receiving heavy pressure from the War Hawks in Congress, signed the American declaration of war into law . </P> <P> With the majority of their army in Europe fighting Napoleon, the British adopted a defensive strategy . American prosecution of the war effort suffered from its unpopularity, especially in New England, where it was derogatorily referred to as "Mr. Madison's War". American defeats at the Siege of Detroit and the Battle of Queenston Heights thwarted attempts to seize Upper Canada, improving British morale . American attempts to invade Lower Canada and capture Montreal also failed . In 1813, at the Battle of Lake Erie the Americans won control of Lake Erie and at the Battle of the Thames, defeated Tecumseh's Confederacy, securing a primary war goal . At sea, the powerful Royal Navy blockaded American ports, cutting off trade and allowing the British to raid the coast at will . In 1814, one of these raids burned the capital, Washington, although the Americans subsequently repulsed British attempts to invade New England and capture Baltimore . </P>

Who was the us president that declared war on britain in 1812