On 27 March 1802, France, under the leadership of Napoleon Bonaparte, and Britain ended their hostilities with the Treaty of Amiens. The peace was short-lived, however, as the British and French declared war again on 16 May 1803. Napoleon prepared for the invasion of Britain, but the Royal Navy controlled the English Channel, and the French invasion never materialized.
Nonetheless, Napoleon sought to weaken Britain with the "Continental System," a measure that closed all European ports to British merchant vessels. In 1805, the British Parliament responded by passing the Orders-in-Council establishing a blockade of all French ports. Ships of the Royal Navy intercepted any merchant vessels bound for France. The merchant captains had the choice of delivering their cargos to British ports or having their ships and cargo confiscated by the Royal Navy.
The United States had established trade relations with several European states, and Napoleonic France was one of its largest trading partners. The British blockade proved devastating to the American cotton and tobacco industries. In addition, the U.S. government was furious with the British for intercepting American merchant ships. Anger at the actions of the Royal Navy was a major factor leading to the American declaration of war on Britain in 1812 and the subsequent invasion of Canada.