Answer:
President Polk accepted the 49th parallel as the Northern border of the Oregon Territory to avoid a war with Great Britain, which would suppose a parallel conflict to the one that the United States had with Mexico in 1846. This was agreed during the Oregon Treaty.
The Oregon Treaty was an agreement signed by the United States and the United Kingdom to reach a consensus on border disputes over the Oregon region. The treaty was signed on June 15, 1846 in Washington.
The previous Treaty of 1818 established the boundaries between the United States and British North America along the 49 ° N latitude from Minnesota to the Rocky Mountains. The treaty provided for joint control of the area for 10 years, both countries were able to claim the area and both were guaranteed free passage.
Joint control became increasingly difficult for both sides. After a British minister refused the proposal of US President James K. Polk to fix the border at 49 ° N, the Democratic Party's expansionists demanded the annexation of the entire area to 54° 40' N. The onset of the Mexican-American War led the Americans away and reached a compromise. The Oregon Treaty thus established the boundary between the United States and British North America to be at 49th latitude.