Polk's request ignited opposition, as he had never before made public his desire to annex parts of Mexico (aside from lands claimed by Texas). It was unclear whether such newly acquired lands would be slave or free, and there was fierce and acrimonious sectional debate. A freshman Democratic Congressman, David Wilmot of Pennsylvania, previously a firm supporter of Polk's administration, offered an amendment to the bill, the Wilmot Proviso, that would ban slavery in any land acquired using the money. The appropriation bill, with the Wilmot Proviso attached, passed the House, but died in the Senate.[179] This discord cost Polk's party, with Democrats losing control of the House in the 1846 elections. In early 1847, though, Polk was successful in passing a bill raising further regiments, and he also finally won approval for the appropriation.[180]

Antonio López de Santa Anna, 1847
To try to bring the war to a quick end, in July 1846 Polk considered supporting a potential coup led by the exiled Mexican former president, General Antonio López de Santa Anna, with the hope that Santa Anna would sell parts of California.[181] Santa Anna was in exile in Cuba, still a colony of Spain. 