Buchanan also argued for the annexation of both Texas and the Oregon Country. In the lead-up to the 1844 Democratic National Convention, Buchanan positioned himself as a potential alternative to former President Martin Van Buren, but the nomination went to James K. Polk, who won the election.[24]

Diplomatic career
Secretary of State
Buchanan (second from the left) in Polk's cabinet, 1849Buchanan was offered the position of Secretary of State in the Polk administration, as well as the alternative of serving on the Supreme Court. He accepted the State Department post and served for the duration of Polk's single term in office. He and Polk nearly doubled the territory of the United States through the Oregon Treaty and the Treaty of Guadalupe Hidalgo, which included territory that is now Texas, California, Nevada, New Mexico, Arizona, Utah, and Colorado.[25] In negotiations with Britain over Oregon, Buchanan at first preferred a compromise but later advocated for annexation of the entire territory. Eventually, he agreed to a division at the 49th parallel. After the outbreak of the Mexican–American War, he advised Polk against taking territory south of the Rio Grande River and New Mexico. 