Britain and the United States signed the Convention of 1818, setting their border at the 49th parallel from the Lake of the Woods to the Rocky Mountains. The agreement left the Oregon Territory jointly occupied — both nations could settle there. That arrangement lasted until 1846, when they extended the 49th parallel to the Pacific. The border runs 5,525 miles, mostly undefended.