The California colonists from the United States gradually became more and more bitter against the Mexican local government.

On June 14, 1846, they seized the “presidio” of Sonoma, located north of San Francisco, and declared their settlement an independent territory. This rebellion became known as the Bear Flag Revolt because a new flag was hoisted on the flagpole where the Mexican flag had previously flown. The unbleached cloth featured a star, a grizzly bear (there were many bears in the local forests at the time), and the words “Republic of California”. The settlers emphasized California’s independence from Mexico.

The rebels were supported by John Charles Frymont, an explorer and future Republican Party candidate for the presidency of the United States.

However, the republic of the rebellious California Americans did not last long. On July 7, 1846, the U.S. Navy under the command of John D. Sloat planted the flag of the United States on the California coast, in the city of Monterey, and formally proclaimed California to be the property of the United States. In August, Sloat was replaced by Commander Robert F. Stockton, who headed the new government of California and became its first governor.

A month later, Mexican troops under Captain José María Flores successfully attacked the new republic, seizing control of a large portion of southern California’s San Luis Obispo region.

A few months later, in December 1846, a U.S. military force under Brigadier General Stephen W. Kearny arrived in California. They were defeated at the Battle of San Pascal (near present-day Escondido), but after the first failure, Kearny’s soldiers joined with Stockton’s troops and captured Los Angeles on January 10, 1847.

At Los Angeles, the Mexican government capitulated by signing a document known as the Cahuenga Capitulation. Under this document, Mexico agreed to admit defeat. .

Treaty of Guadalupe-Hidalgo

Although New Mexico, California, and the U.S.-required regions of Texas were actually in American hands, Mexico declared itself unwilling to recognize these realities in a peace treaty and formally cede these areas. Thus the war continued until early 1848, until Mexico, after conquering its capital, was finally forced to agree to a peace treaty.

Voices were raised in America demanding the conquest of the whole country. But Polk would not go for it: he was prepared to confine himself to recognizing Texas as part of the United States, and to buying California and New Mexico.

On February 2, 1848, the American-Mexican Treaty of Peace, Friendship, and Boundary (Treaty of Guadalupe-Hidalgo) was concluded at Guadalupe-Hidalgo, ending the war. Under this Treaty, the boundaries between Mexico and Texas were established along the Rio Grande River, Mexico recognized the annexation of Texas, New Mexico and Upper California by the United States, losing more than half of its territory (2.3 million square kilometers). U.S. citizens were allowed free navigation on the Colorado River (in Mexican territory) and the Gulf of California.

For the renunciation of territorial claims the USA paid Mexico 15 million dollars. In addition, the U.S. government assumed payment of its citizens’ financial claims against Mexico in the amount of $3.25 million. The U.S. recognized former land ownership rights in the Southwest and offered citizenship to all Mexicans living in the area.