President James Polk was a surprise Presidential Candidate in 1844. He was named to that ballot after Van Buren, who was the ex President, and Whig Candidate Henry Clay both said they were against annexation of Texas.
When they both spoke out, the Democratic party dropped Van Buren from the Presidential Ticket, and on the ninth nomination ballot they named James Polk.
Polk has spoke out strongly for the annexation of Texas and the “occupation” of the Oregon Territory. This was enough to help get him elected. After he was elected, He spoke up and said that he believed that the Oregon Territory should be divided along the 49th parallel.
The British said no, that they believed that more territory should be in British hands. When the British said that, President James Polk responded in saying that he thought the joint occupation agreement with the British should be immediately terminated, and that the North boundary should be extended much further north, including much of modern day Canada.
When President Polk announced that he was terminating the Joint occupation agreement of the Oregon Territory, it frightened the British, who really did not want to go to war over the Oregon Territory. They reconsidered, and agreed to divide the Oregon territory along the 49th parallel.
This was what President Polk wanted all along, so the British signed what became known as the Oregon Treaty with the United States, in 1846. It was an example of how President James Polk often would stand his ground, and while everyone else would posture, he would remain firm.
Eventually the British wound up giving President Polk what he wanted, and the Oregon Treaty went into effect after its signing in 1846. He was a strong, decisive President that wound up obtaining what is now known as the Oregon Territory from the British.