On May 14, 1846, the U.S. Congress declared that the country was at war with Mexico. Despite protestations to the contrary, the primary purpose of U.S. President James K. Polk in executing the war was the acquisition of California. In 1847, Nicholas P. Trist was sent on a diplomatic mission to deliver Polks peace terms to the Mexican president, Santa Ana. Angered by the Mexican governments rejection of his terms, Polk issued a recall order in November which Trist chose to ignore. He eventually negotiated a settlement on February 2, 1848, that contained nearly everything that Polk had hoped for. This diplomatic history of Americas first foreign war focuses on Trists efforts and the policies of the Polk administration.