<Li> Valparaíso (capture of USS Essex) </Li> <Li> Action of 9 May 1814 </Li> <P> The War of 1812 was a conflict fought between the United States, the United Kingdom, and their respective allies from June 1812 to February 1815 . 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> From the outbreak of war with Napoleonic France, Britain had enforced a naval blockade to choke off neutral trade to France, which the US 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 the US . In 1811, the British were in turn outraged by the Little Belt affair, in which 11 British sailors died . Britain supplied Indians who raided American settlers on the frontier, which hindered American expansion and provoked resentment . Historians debate whether the desire to annex some or all of British North America (Canada) contributed to the American decision to go to war . On June 18, 1812, US President James Madison, after heavy pressure from the War Hawks in Congress, signed the American declaration of war into law . </P>

Who did america fight in the war of 1812