After the Spanish possession now known as Mexico (first known as "América Septentrional" or "Northern America") won its War of Independence from Spain in 1821, Mexico initially retained Spain's missions and settlements along the Pacific coast, and continued Spain's claims to territory as far north as today's border between California and Oregon. In the 1830s, Mexico ended Church control of the missions in California and opened the land to secular development, particularly ranching. By the 1840s, there were small Mexican settlements at San Diego, Los Angeles, San Francisco, and the territorial capital at Monterey. These settlements primarily traded cattle hides and tallow with American and European merchant vessels. This period is vividly portrayed in Bostonian Richard Henry Dana, Jr.'s famous seafaring memoir, Two Years Before the Mast and the culture of the great Mexican landowners of this period is often harked back to as exemplifying the height of California's romantic pastoral era. Mexican control of the territory ended after only 25 years, when attempts by local Mexican officials to expropriate the property of American ranchers and drive them out of California in the winter led to the successful uprising known as the Bear Flag Revolt.
