The California Republic, like the Republic of Texas, was created as the byproduct of increasing tensions between the United States and Mexico. Unlike the Republic of Texas, however, the California Republic was much shorter lived; it began on June 10, 1846 when John C. Frémont and his men in Sonoma declared independence from Mexico and ended on July 9, 1846 when an American battleship docked in Monterey and alerted Frémont and his men that the Mexican-American War had begun. At this point, California was annexed into the United States. Its president was William Brown Ide.

The most significant legacy of the California Republic is California's state flag, which has a grizzly bear and the words "California Republic" near the bottom. This was the flag created by Frémont and his men; this led their actions to be dubbed the "Bear Flag Revolt".