The War of 1812 was fought from 1812 to 1815 between the United States of America and the British Empire. The immediate stated causes for the U.S. declaration of war were several. First, a series of trade restrictions introduced by Britain to impede American trade with France, a country with which Britain was at war. The U.S. contested these restrictions as illegal under international law. Second, the impressment (forced recruitment) of U.S. citizens into the Royal Navy. Third, the alleged British military support for American Indians who were offering armed resistance to the United States.
The war was fought in three major theatres: on the oceans, where the warships and privateers of both sides preyed on each other's merchant shipping; along the American coast, which was blockaded with increasing severity by the British who also mounted large-scale raids in the later stages of the war; and the long frontier between the United States and Upper Canada (the present-day province of Ontario) and Lower Canada (the present-day province of Quebec), which ran along the Saint Lawrence River and the Great Lakes. The United States could directly attack British territory and armies only in this last theatre. During the course of the war, both the Americans and British launched invasions of each other's territory across this frontier, most of which were unsuccessful or gained only temporary success. At the end of the war, the British held parts of Maine and some outposts in the sparsely populated west while the Americans held Canadian territory near Detroit, but all occupied territories were restored at the end of the war.
In 1812, Britain's Royal Navy was the world's largest, with several hundred vessels in commission. Although most of these were involved in blockading the French navy and protecting British trade against French (and Danish) privateers, the Royal Navy nevertheless had eighty-five vessels in American waters. By contrast, the United States Navy, which was not yet twenty years old, was a frigate navy that had only twenty-two commissioned vessels, though a number of the American frigates were exceptionally large and powerful for their class. Whereas the standard British frigate of the time mounted 38 guns, with their main battery consisting of 18-pounder guns, the USS Constitution, USS President and USS United States were theoretically 44-gun ships and capable of carrying 56 guns respectively, with a main battery of 24-pounders. The first 3 battles were won by the American navy, The Java (while carring a rescued Jack and part of the crew of the HMS Leopard. was lost to the USS Constitution. The first ship of the Royal Navy to capture a American ship was the HMS Shannon. The war ended after the Napoleonic Wars, witch over showed the war of 1812.