Note: throughout the period covered, Native American Indian tribes did not accept the right of Spain, Mexico, the Republic of Texas, or the United States to occupy their lands.
Adams-Onis Treaty of 1819 sets the boundary between the United States and Spain at the Sabine River, the Red River, the Arkansas River, then the 42nd parallel west to the Pacific Ocean. Spain ceded Florida to the United States, and "The United States hereby cede to His Catholic Majesty, and renounce forever, all their rights, claims, and pretensions to the Territories lying West and South of the above described Line." [See text of Adams-Onis Treaty]
Mexico becomes independent of Spain, 1821. The new government encourages immigration to the Texas region, including by U.S. citizens.
1828. A Mexican government fact finding mission finds U.S. citizens are seizing land in Texas by fraud and by force and are suspected of plotting to annex Texas to the United States.
1836. Texas War of Independence. A Mexican army led by Antonio Lopez de Santa Anna enters Texas to restore order. U.S. citizens form militias, and after suffering a string of military defeats, defeat the Mexican Army at the Battle of San Jacinto on April 21, 1836. Captured and as a prisoner of war under duress, Santa Anna signed papers (Treaties of Velasco) promising to cease hostilities. Mexican troops were to relocate south of the Rio Grande, but this was not stated as an actual boundary of the Republic of Texas. The boundaries were to be established in a later treaty. Texas reneged on some of the provisions, and the government of Mexico refused to ratify the agreement, as it was beyond Santa Anna's authority and extracted under duress.
1837. The United States of America recognizes Texas as an independent nation. President Martin Van Buren turns down a formal request from Texas for annexation.
1842. Faced with bankruptcy, Texas again pursues annexation by the U.S., with the alternative of stronger ties with Great Britain. Mexican troops capture San Antonio, but later withdraw. The U.S. and Great Britain continue to haggle about where to draw the West Coast line between the U.S. and Canada.
October 18, 1842. U.S. Commodore Thomas Gatesby Jones seizes Monterey, California in Mexico. He had orders to "protect American interests" on the Pacific coast and thought that war between the U.S. and Mexico was imminent. Thirty hours later, receiving news that in fact the U.S. and Mexico were still at peace, Jones apologized and withdrew.
1844. Possible annexation of Texas is a major issue in the presidential election campaigns. An annexation treaty was signed on April 12, 1844, but because of the slavery issue (Texas practiced slavery), Congress does not pass its own bill for annexation until February 28, 1945. John Charles Fremont first enters California on a military exploration expedition.
November 1844. James K. Polk elected President. He and fellow expansionists plan to find a pretext to admit Texas to the union and buy or take New Mexico and California from Mexico.
October 1845. Thomas Larkin, U.S. consul in California, writes Polk that France and Britain have opened consulates there and were urging Mexico to send troops to counter the large influx of American adventurers in the region. Secretary of State Buchanan encourages Californians to revolt against Mexico, as Texas had. The commander of the U.S. Pacific Squadron is given orders to seize San Francisco if he were to "ascertain with certainty" that war had broken out.
July 1845. Brigadier General Zachary Taylor moves U.S. troops into Texas, and Polk insists the Rio Grande is to be the boundary with Mexico once Texas is annexed.
August 29, 1845. Polk orders General Taylor to regard any crossing of the Rio Grande by Mexican troops as an act of war. Taylor given permission to attack first, at his discretion, and take Matamoros on the south bank of the Rio Grande, but not to penetrate further into Mexico. But Taylor, cautious, advances only to Corpus Christi.
December 29, 1845. President Polk signs resolution of Congress admitting Texas to the United States.
1845-1846. The Mexican government repeatedly rejects offers to sell California and the land north of the Rio Grande to the United States.
January 13, 1846. Polk orders Taylor to advance to the Rio Grande and construct Fort Texas opposite Matamoros.
January 27, 1846. Fremont arrives in Monterey, telling Mexican authorities he just wants to resupply before marching north to the Oregon territory. Instead he fortifies Gavilian Peak (now Hawks Peak) and raises the American flag. When confronted with 200 Mexican troops, Fremont and his smaller force abandon their fort on March 9th.
March 1846. Taylor begins construction of Fort Texas on the Rio Grande.
April 12, 1846. Mexican General Pedro de Ampudia sends General Taylor a demand to withdraw his troops to the Nueces River.
Mid April, 1846. General Mariano Arista takes command of Mexican troops and informed Taylor that in his opinion, the war had begun. This was not authorized by the Mexican government, which enduring a civil war.
April 25, 1846. U.S. forces under Captain Seth Thornton clash with Mexican forces north of the Rio Grande; Mexicans win the battle.
April 28, 1846. Polk discusses with his Cabinet asking Congress to declare war.
May 8, 1846. Battle of Palo Alto.
May 8, 1846. John Slidell reports the failure of U.S. attempts to buy the desired lands. Polk says he is preparing to ask Congress to declare war.
May 9, 1846. Battle of Resaca de la Palma.
May 9, 1846. Morning. U.S. Cabinet votes to declare war with 1 dissent.
May 9, 1846. Bearing secret orders from Polk, Lieutenant Archibald H. Gillespie meets Fremont at Upper Klamath Lake. [The orders had been given in on October 30, 1845]
May 9, 1846. Evening. Dispatch from General Taylor handed to President Polk, reporting the Thornton disaster and declaring that hostilities had commenced.
May 11, 1846. Polk asks Congress to declare war on Mexico, stating "Mexico has passed the boundary of the United States, has invaded our territory and shed American blood upon American soil." Later that day House of Representatives passes declaration of war 174 to 14.
May 12, 1846. Senate, after a lengthier debate, approves war 40 to 2.
May 13, 1846. President Polk signs the Declaration of War with Mexico, making it official.
June 14, 1846. A few people in the small town of Sonoma declare California an independent republic (Bear Flag Republic). This is before news of the war arrived.
December 22, 1847. Abraham Lincoln, Whig Party congressman from Illinois, introduces his Spot Resolutions, challenging the idea that the war began when American blood was spilled on American soil.
February 2, 1848. Treaty of Guadalupe Hidalgo, Mexico cedes Texas and what later became the states of California, Nevada, Utah, most of Arizona and parts of New Mexico, Colorado and Wyoming to the United States.
Walter R. Borneman, Polk, The Man Who Transformed the Presidency and America, trade paperback edition, 2008, Random House, New York.
Wikipedia, used to double check and fill in some dates.