For several months Polk's plans succeeded in all theaters of action. On the Rio Grande, Taylor put his troops out of danger by defeating a larger Mexican army in two battles, Palo Alto (8 May) and Resaca de la Palma (9 May). Then he occupied Matamoros and, after receiving reinforcements, moved slowly into northeastern Mexico. At the same time, the Americans were carrying through the occupation of California. When Gillespie arrived with instructions, Larkin began quietly to propagandize among the inhabitants for annexation, but Frémont in the interior determined on more drastic action and assumed the leadership of an independence movement among American settlers in the Sacramento area, to found the so-called Bear Flag Republic. At this point Commodore Sloat of the Pacific squadron received news that war had broken out. Moving his ships to Monterey, he occupied the whole bay area. A little later Stockton and the Congress arrived; Polk sent troops overland; and the combined American forces, regular and irregular, completed the occupation. British naval forces off the coast observed the American actions with impotent chagrin, for they could not take counteraction without orders from London, which were never sent.
Meanwhile, the United States and Britain had solved the Oregon problem. By early May the conciliatory wording of the congressional resolution on Oregon made it possible for Aberdeen to renew negotiations. First, the foreign secretary argued the British cabinet into approving an offer of compromise terms; then, he proposed to McLane a treaty dividing the disputed territory at the forty-ninth parallel, with Vancouver Island reserved to Britain and navigation rights on the Columbia River to the Hudson's Bay Company. Polk balked at the navigation rights but agreed to submit the whole matter to the Senate. Buchanan and Pakenham quickly drew up a treaty, and on 18 June the Senate approved it by 41 to 14. (Navigation rights were included but made subject to American law.) While the coming of the war undoubtedly made Polk and Congress more eager for a settlement, it does not seem to have played an important role in forming British policy. During June and July, Britain and the United States further improved their relations by lowering tariffs and thereby increasing their trade.
Success on the Rio Grande, in California, and in Oregon undoubtedly led Polk to expect a short war with Mexico and a quick treaty confirming the annexation of California and some connecting territory. He had reckoned without the Mexican sense of honor. Showing unexpected powers of resistance, the Mexicans were favored by their formidable geography: a belt of semidesert in the north, mountain ranges in the center, and the fever-ridden Gulf coast. Polk put out peace feelers to Antonio López de Santa Anna, an opportunistic spoilsman who had been president of Mexico twice in the past but was then exiled in Havana. Santa Anna hinted that if he were enabled to regain power, he would negotiate with the United States. Polk granted him free passage through the American blockade and meanwhile had Buchanan write to Mexico City suggesting negotiations. Nothing came of either venture. The government bluntly refused to discuss terms; and after Santa Anna had seized power, he ignored his assurances to Polk, issued a call for troops, and organized Mexico's defense against the Americans. Meanwhile, Taylor had advanced beyond the Rio Grande and captured Monterrey (not to be confused with the port in California), only to see its defenders retreat into the dry lands to the south.
Polk resented these frustrations all the more because several forces were pressing him for an early peace. One was the British government, which hoped to mediate before the Americans advanced any farther; Polk politely but firmly refused its advances. More important, the Whig opposition was gaining support for its antiwar campaign in all parts of the country and especially among the northern antislavery bloc—both outright abolitionists and free-soil men, who opposed taking slavery into the territories. They were convinced that Polk, a southerner, had started the war to obtain more slaveholding territory. (The fact that Calhoun also opposed the war impressed few of these men. By then they thoroughly distrusted the South Carolina senator.) When Polk sought a special appropriation of $2 million in order to make a cash offer to Santa Anna if he seemed receptive, the antislavery bloc attached to the bill the notorious Wilmot Proviso, which would have forbidden slavery in any part of the territory to be gained from Mexico. Polk finally obtained his money at the following session of Congress, but his opponents had gained a useful issue for harassment.
By the end of 1846, Polk had to choose between alternate strategies for fighting the war and obtaining a peace. One was to occupy all of northern Mexico as far south as Tampico and San Luis Potosí, establish a line of forts, and wait until the Mexicans gave up. The other was to seize Tampico and Veracruz, the principal Gulf ports; send an army west from Vera-cruz along the old Spanish road through the mountains; and, if necessary, occupy Mexico City. The first tactic was obviously within American capabilities, for small detached forces had already marched almost at will through New Mexico and Chihuahua. It was the safer and less expensive of the two strategies, but it called for patience from the dynamic American people, already restive at the duration of the war. The second plan was much riskier, for it required a landing and unprecedented supply lines through the fever zone and across a punishing terrain. One victory for the Mexicans might encourage them to hold out indefinitely, and continued American successes would surely arouse the expansionists' appetite for territory. Buchanan and most moderates favored the defense line. Slidell, Benton (who now ardently supported the war), and other activists called for a central invasion.
For several months Polk postponed a final decision, although in November 1846 he authorized the army to make plans for the capture of Veracruz. (Tampico was occupied without Mexican resistance at the same time.) Meanwhile, he sent special agents into Mexico to seek out signs of peace sentiments. In January 1847 a Mexican emissary arrived in Washington to inquire about American terms, armed with letters from Santa Anna and other Mexican officials. Polk replied with a formal proposal for negotiations. When the government in Mexico City returned a demand that the Americans withdraw from all Mexican territory before negotiations would be considered, Polk became furious at what he considered Mexican trickery and committed himself to an invasion of central Mexico.
Polk reluctantly entrusted the invasion to General Winfield Scott, the ranking officer in the army and an excellent choice. After the central campaign had begun, Taylor advanced south of Monterrey without orders and defeated Santa Anna in a hard-fought, close, but strategically insignificant battle at Buena Vista, which established him as a hero in the public eye. Scott landed successfully, captured Veracruz, and, in order to avoid the fever, quickly proceeded into the interior. Meanwhile, Santa Anna, a forceful leader if no great tactician, suppressed a civil war in Mexico City, pulled his army together, and marched out to meet Scott, taking up a strong defensive position in a mountain pass. In the most spectacular victory of the war, at Cerro Gordo (17–18 April 1847), Scott managed to outflank the Mexicans and drive them back in disorder; then, he occupied the large upland city of Puebla. Beaten for the second time in less than two months, Santa Anna limped back to Mexico City.
Since neither army had enough immediate strength for further fighting, Polk decided on another peace feeler. This time he chose an orthodox, if minor, diplomat, Nicholas P. Trist, chief clerk and de facto undersecretary of the State Department. Trist was a protégé of Buchanan, a certified Democrat (his wife was Jefferson's granddaughter), spoke fluent Spanish, and knew Latin American ways. Polk instructed him that he should obtain at least a boundary line up the Rio Grande and across southern New Mexico at about 32° to San Diego on the Pacific coast. For this he was to offer $15 million; but if Mexico would also cede Lower California or other territory, he might raise the price. These terms represented a compromise between expansionists such as Benton and moderates such as Buchanan.
After an initial period of jealous and puerile bickering, Trist and Scott formed an effective team and tried every expedient they could conceive, straightforward or devious, to bring the Mexicans to terms. First, they established a reliable line of communications to the Mexican government through the British minister at Mexico City, who was eager to end the fighting. Then, at a hint from Santa Anna, they sent him a "sweetener" of $10,000 and promised immediate payment to Mexico of $1 million upon signature of a treaty. (When Polk learned of the thinly disguised bribes, he was scandalized and seriously considered recalling both Scott and Trist.)
After Santa Anna, perhaps losing his nerve, repudiated his overture, Scott led his forces into the Valley of Mexico, defeated the Mexicans in two more battles (Contreras and Churubusco), and encamped just outside Mexico City. Trist then met a commission of Mexicans to discuss terms, but Santa Anna, torn between factions, rejected them. Scott fought and won two more battles (Molino del Rey and Chapultepec) and finally, seeing no alternative, attacked Mexico City itself on 13 September 1847, drove out the government, and prepared for indefinite occupation. Santa Anna, thoroughly discredited, resigned and headefor exile again, while the Mexican Congress and the ranking civilian leaders straggled off to a provincial capital to reorganize. The war had reached another impasse.
Back in the United States the impatient American public was feeling more and more frustrated at the recurring news of Scott's victories and persistent Mexican resistance. Opponents of the war continued to cite mounting casualty lists and appropriations, but a newly active group of ultraexpansionists, northern and southern, used the same casualties and appropriations to justify the United States in demanding more territory—even the annexation of all Mexico. Opponents deplored such ruthless conquest as degrading to the American character and predicted that if absorbed, the "mongrel" Mexican people would corrupt American democracy. Expansionists replied with "Manifest Destiny"—God had provided an opportunity for the United States to regenerate Mexico.
Having learned a few lessons from the Oregon debates, Polk reacted to the all-Mexico movement with caution. He was not unalterably opposed to acquiring territory south of the Rio Grande and 32°; but with every Democratic politician jockeying for position in the presidential race of the following year, he did not want to give up control over his party by taking sides prematurely. For a time he left negotiations to Trist, despite his mounting dissatisfaction. When he learned of the futile dickering at Mexico City, his impatience boiled over, and he decided to take another strong stand. Ordering Trist to come home, the president declared that if the Mexicans decided to discuss terms, they could send a representative to Washington.
By the time this order reached Trist, in mid-November, the situation in Mexico had changed to the American advantage. The civilian government that succeeded Santa Anna was moderate and favored negotiation. Although extremists invoked patriotism to continue the war, the government gradually brought them under control. When the order for Trist's recall arrived, he feared that the chance for negotiations, if not exploited, might disappear. Scott's troops might then have to remain in Mexico indefinitely, surrounded by an increasingly hostile population and fighting off guerrilla bands. Others in Mexico City were also aware of the dangers of indefinite occupation: American army officers, friendly Mexicans, and European residents. Urged by them and after several days of hesitation, Trist decided to disobey his orders and stay. Even after that decision, he had to wait two more months for a settlement, arguing every point at issue with the Mexican commissioners. Finally, on 2 February 1848, they signed the Treaty of Guadalupe Hidalgo, carrying out the most important of Trist's instructions. Through it, the United States obtained Upper California and New Mexico in return for $15 million plus $3.75 million of American claims against Mexico.
Trist's courageous insubordination rescued the president from the impossible task of reconciling American and Mexican ultranationalists. The text of the treaty arrived in Washington just as the all-Mexico movement crested, and Polk lost little time in submitting it to the Senate. Whatever he may have felt about additional annexations, he could not deny that Trist had achieved the original goals of the war, and he had some idea of the dangers to be incurred in continuing it. Except for ultranationalists, the country received the treaty with a collective sigh of relief, and on 10 March 1848, after the Senate had taken time to consider the alternatives, it approved nearly all the terms, by a vote of thirty-eight to fourteen. The Mexicans accepted a few revisions without difficulty, and the American troops were soon on their way home. The triumph was slightly marred by a needless quarrel between Scott and his principal officers. Because of the incident, Polk recalled Scott, to the astonishment of the Mexicans, and set up a military court of inquiry, but no important action was taken. Polk vented his spleen on Trist for disobedience and tactless dispatches by stopping his salary at the point of his recall. The unfortunate envoy, who deserved much better, had to wait over twenty years for full payment or any other recognition of his accomplishment.
During the last year of Polk's administration, he briefly considered other ways of acquiring territory that he mistakenly suspected of being the object of British designs. Soon after the war ended, the rebellious Mexican province of Yucatán sought an American protectorate and intervention in a destructive local Indian war. Polk submitted the proposal to Congress, but before Congress could act, a truce between Indians and whites in Yucatán removed the issue. During the summer of 1848, Polk instructed his minister to Spain, Romulus M. Saunders, to explore the possibility of purchasing Cuba, recently racked by rebellion. The inexperienced Saunders could not prevail against Spanish national pride, and a trial vote in the Senate indicated that the upper house would probably have rejected a purchase treaty anyway. These failures were undoubtedly fortunate for both Polk and the country, as the southwestern annexations and the sectional arguments they aroused strained the national institutions to their limit.
Farther south, in Central America, the influence of Britain was more overt, but the Polk administration had little success in countering it. Polk sent Elijah Hise as chargé d'affaires to Guatemala with instructions to encourage the weak, feuding Central American states to revive their recently dissolved confederacy. Hise was also to negotiate commercial treaties and report on British encroachments. Hise signed two commercial treaties and went beyond his instructions in contracting for perpetual canal rights across Nicaragua, but this treaty was not ratified. A more important action was a treaty of 12 December 1846 with Colombia, which owed little to Polk's direction. Secretary Buchanan had instructed the American chargé at Bogotá, Benjamin A. Bidlack, to negotiate a commercial treaty and guard against European efforts to obtain sole transit rights across the Isthmus of Panama, which was then part of Colombia. Bidlack included in the treaty (article 35) a long statement in which Colombia guaranteed to the United States that the isthmus would always be open and free to Americans. In return, the United States guaranteed the neutrality of the isthmus and Colombia's sovereignty over it.
When the cabinet saw these provisions, its members remarked doubtfully that the American guarantees seemed to violate the country's tradition against entangling alliances, but Polk submitted Bidlack's treaty to the Senate. Busy with the Mexican War, that body delayed action for over a year, while Colombia kept a special envoy in Washington to lobby for the treaty. In June 1848, the treaty was approved with almost no discussion. This casually adopted treaty led to a considerable expansion of American influence: the construction of a successful railroad in the 1850s, repeated American naval interventions on the isthmus during the succeeding decades, and finally, in 1903, Theodore Roosevelt's veiled support for an independence movement in Panama and the digging of the Panama Canal. It is not likely that Polk had any of these developments in mind when he received and submitted the Bidlack Treaty, but he might have applauded Roosevelt's deeds, had he been alive to witness them.