An earlier treaty had established the border between Canada and the United States at the 49th parallel, but only to the Rocky Mountains. West of the Rockies was undefined and jointly occupied by British and Americans. During the mid-1800s, however, the Pacific region border came under dispute. More Americans were settling in the area, known as Oregon Country. But the Hudson's Bay Company was also trading there and settling the area with English, Scots and French Canadians who worked for the HBC.
In the American election of 1844, James Polk campaigned for "54°40' or Fight." He wanted the American border to be set at 54°40' latitude, just below the Russian territory of Alaska. He won the election, but chose not to fight because a war with Mexico had begun in 1846. The British had wanted their border to be further south, following the Columbia River to the 42nd parallel, but in the end it was set at the 49th parallel, except for Vancouver Island which would remain British even though it dipped below this line. The border treaty was signed in June 1846.