The Republic of California is a sovereign state located in North America. A Spanish speaking nation, closely allied with the United States of America. California has a very high agricultural production, but a relatively small population. Most of the agriculture is exported to the USA.
Before the war between the United States and Mexico had begun, a group of American immigrants revolted against the centralization policies of President Antonio López de Santa Anna. These same policies had resulted in the earlier 1836 uprising in Texas and other ones in Mexico, which Santa Anna had successfully defeated. When war became likely between the United States and Mexico, U.S. Army Major John C. Frémont, who had arrived in California claiming to be on a mission to find a route to the Pacific (his mission officially was to find the source of the Arkansas River), began encouraging a rebellion among the Anglo-American settlers. As a result, thirty-three settlers in Sonoma declared a republic and raised a homemade flag with a bear and star (the "Bear Flag") to symbolize a new Californian Republic. Their actions are called the "Bear Flag Revolt."
The same day, the rebels captured the Commandant of Northern California, General Mariano Guadalupe Vallejo, who openly endorsed the inevitability of the annexation of California by the United States. Vallejo was sent to Sutter's Fort, where he was kept a prisoner until August 1, 1846. The Republic's first president was William B. Ide, whose term lasted five years. On June 23, 1846, Frémont arrived with sixty soldiers and took command in the name of the United States. The Bear Flag was replaced by the Stars and Stripes. The "republic" vanished and Ide enlisted in the U.S. forces as a private. The Mexican governor sent 55 men to attempt to crush the rebellion, but General José Castro's forces defeated Frémont at the First Battle of Olompali. These men were routed at a Second Battle of Olompali. Frémont was killed in the second battle, and the Sonoman ebels realized that they would have to go it alone.
Unknown to Frémont and the Bear Flag supporters, war had already been formally declared on May 13, 1846, but the news did not reach California until early July, when the frigate USS Savannah and the two sloops, USS Cyane and USS Levant, of the United States Navy attempted to capture Monterey, California.
Full fledged autonomy wasn't recognized until some time after Texas had conquered Sonora and Chihuahua
California fought a protracted border war with Texas which only ended with the end of Texas as a nation.