Throughout much of Jefferson's presidency, France and Britain engaged in the Napoleonic Wars. During Jefferson's second term, both the British and French stepped up efforts to prevent American trade with their respective enemy. Particularly offensive to many Americans was the British practice of impressment, in which the British forced captured American sailors to crew British ships. Jefferson sent James Monroe to Britain to negotiate a renewal and revision of the 1795 Jay Treaty, but Jefferson rejected the treaty that Monroe reached with the British. After the 1807 Chesapeake–Leopard affair, Jefferson proposed, over Gallatin's strong objections, what would become the Embargo Act of 1807. That act forbade all American ships from engaging in almost all foreign trade, and it remained in place until its repeal in the final days of Jefferson's presidency. Despite Gallatin's objection to the embargo, he was tasked with enforcing it against smugglers, who were able to evade the embargo in various ways. The embargo proved ineffective at accomplishing its intended purpose of punishing Britain and France, and it contributed to growing dissent in New England against the Jefferson administration. Overcoming Jefferson's declining popularity and the resentment at the embargo, Secretary of State Madison won the 1808 presidential election.