During this time the ongoing Napoleonic Wars began to more strongly affect Americans, as Britain attacked American shipping and impressed American sailors. President Thomas Jefferson retaliated with the Embargo Act of 1807, stopping all trade to both Britain and France. As New England relied on commerce with the two nations, the region strongly suffered from the embargo, and Webster wrote an anonymous pamphlet attacking Jefferson's policies. He also campaigned for various Federalist candidates, including presidential candidate Charles C. Pinckney and gubernatorial candidate Jeremiah Smith. Although Jefferson's Democratic-Republican Party dominated national elections, the Federalist Party was competitive throughout the states of New England. In 1812, the United States declared war against Britain, beginning the War of 1812. On July 4, 1812, Webster was invited to give a speech before the Washington Benevolent Society. His speech, which strongly attacked the war but warned against secession, was reprinted in newspapers throughout New England.