Actually, Polk was President when the US declared war on Mexico, in 1846.
fantastic success for the US, increasing our land area by about 1/3
(solidifying our grip on Texas, and adding Arizona, New Mexico, California,
Nevada). From a moral perspective, the war is one of the more ignominious
chapters in our history. The war began after Mexico attacked US troops that
were stationed in disputed territory on the southern border of Texas, which
Mexico had considered part of its territory for 100's of years. But, since
the US had considered this to be part of its territory for a few months,
this constituted an attack on US troops on US soil, so we declared war,
eventually sacking Mexico City. A proud moment for us all.
Of course, appx. 50 years later we similarly go after the Spanish --
"remember the Maine!" It strikes me that a common theme among the US wars
of the 19th century, excepting the War of 1812, is racism. Civil War:
white/black, Mexican and Spanish: white/hispanic. Of course, interspersed
is the "racial cleansing" of the indiginous peoples of the US.