quality:corruption, stylistic:style_transfer, linguistic:paraphrasing
Mexican period

In 1821, the Mexican War of Independence gave the Mexican Empire (which included California) independence from Spain. For the next 25 years, Alta California remained a remote, sparsely populated, northwestern administrative district of the newly independent country of Mexico, which shortly after independence became a republic. The missions, which controlled most of the best land in the state, were secularized by 1834 and became the property of the Mexican government. The governor granted many square leagues of land to others with political influence. These huge ranchos or cattle ranches emerged as the dominant institutions of Mexican California. The ranchos developed under ownership by Californios (Hispanics native of California) who traded cowhides and tallow with Boston merchants. Beef did not become a commodity until the 1849 California Gold Rush.

From the 1820s, trappers and settlers from the United States and Canada began to arrive in Northern California. These new arrivals used the Siskiyou Trail, California Trail, Oregon Trail and Old Spanish Trail to cross the rugged mountains and harsh deserts in and surrounding California. The early government of the newly independent Mexico was highly unstable, and in a reflection of this, from 1831 onwards, California also experienced a series of armed disputes, both internal and with the central Mexican government. During this tumultuous political period Juan Bautista Alvarado was able to secure the governorship during 1836–1842. The military action which first brought Alvarado to power had momentarily declared California to be an independent state, and had been aided by Anglo-American residents of California, including Isaac Graham. In 1840, one hundred of those residents who did not have passports were arrested, leading to the Graham Affair, which was resolved in part with the intercession of Royal Navy officials.

One of the largest ranchers in California was John Marsh. After failing to obtain justice against squatters on his land from the Mexican courts, he determined that California should become part of the United States. Marsh conducted a letter-writing campaign espousing the California climate, the soil, and other reasons to settle there, as well as the best route to follow, which became known as "Marsh's route". His letters were read, reread, passed around, and printed in newspapers throughout the country, and started the first wagon trains rolling to California. After ushering in the period of organized emigration to California, Marsh became involved in a military battle between the much-hated Mexican general, Manuel Micheltorena and the California governor he had replaced, Juan Bautista Alvarado. At the Battle of Providencia near Los Angeles, he convinced each side that they had no reason to be fighting each other. As a result of Marsh's actions, they abandoned the fight, Micheltorena was defeated, and California-born Pio Pico was returned to the governorship. This paved the way to California's ultimate acquisition by the United States.