During the War of 1812, the Detroit River served as a major barrier between the American Michigan Territory and British Upper Canada, especially during the Battle of Fort Detroit in August 1812. Detroit briefly fell to the British. After the completion of the Erie Canal in 1817, which opened up easier travel to Lake Erie from the East Coast of the United States, connecting the Great Lakes to the Hudson River and the port of New York City, the Detroit River became a route for many migrating settlers traveling to northern Michigan. Detroit rapidly attracted a share of new residents. Following the Patriot War, in which British regulars and Michigan militia nearly came to armed conflict on the ice-covered Detroit River, the United States built Fort Wayne at Detroit to counter Britain's riverside Fort Malden at Amherstburg across the river.