At dawn on June 14, 1846, a ragtag group of about 30 gun-toting Americans entered Sonoma, a small town in the Mexican territory of Alta California. Prepared to take the town by force, they instead sat for brandy with Col. Mariano Vallejo of the Mexican army and accepted his surrender. For the next 25 days, California was an independent nation: the California Republic.

Known as the Bear Flag Revolt, a reference to the short-lived republic’s flag, this event was something between an American invasion and a miniature war of independence. Though the fighting was limited and the country it established lasted less than a month, the Bear Flag Revolt led directly to the American acquisition of what is now its most populous state.

Rebellion Begins Brewing in Texas

In the mid-19th century, Mexico still controlled vast swaths of the what is now the Southwest United States. In 1835, a revolt began in the Mexican province of Texas. Although the United States was officially neutral, Americans like Stephen F. Austin and Sam Houston led a rebellion against Mexican rule, and hundreds of Americans, including members of the U.S. Army, joined the fight. The result was the Republic of Texas, an independent nation ruled by American settlers, which was then absorbed into the United States in 1846—triggering the Mexican-American War.

According to Dr. Linda Heidenreich, whose book This Land Was Mexican Once examines the Latino experience of the Bear Flag Revolt and similar insurrections, the annexation of Texas made it clear to the Californios—Mexican residents of the province of Alta California—that their government was too poor, too unstable and too weak to stop American settlers from overrunning California. Some argued in favor of independence. Others considered inviting the United States to take over.

“If you read the reports of these meetings [of Californios], these people saw it coming,” Heidenriech says. “They were scattering for a plan, and it just wasn’t there.”

The U.S. Sets Its Sights on California

Stock Montage/Getty Images
American explorer, military officer, and politician John Charles Fremont.

Enter Charles Frémont, a captain in the U.S. Army Corps of Topographical Engineers. Newly elected President James K. Polk, whose annexation of Texas was about to set off the Mexican-American War, sent Frémont on an expedition to survey the area of the Great Basin and the Great Salt Lake. Polk secretly instructed Frémont to invade California if war with Mexico broke out—in fact many historians believe that he actually ordered Frémont to start the war himself. Polk made no secret of his desire to annex California and, as Heidenreich points out, the so-called surveying expedition “went to California with a howitzer.”

Frémont’s expedition entered Mexican territory in December of 1845 and quietly informed some of the roughly 800 American settlers of their willingness to assist a rebellion. They nearly came to blows with the Mexican authorities after planting an American flag atop Gavilán Peak (now Frémont Peak, near Salinas, California), but retreated into the Oregon Territory. They also skirmished with local indigenous peoples and carried out at least two massacres, including the murder of several hundred Wintu people in early April. Now known as the Sacramento River Massacre, the scene was described by member of the expedition as “a scene of slaughter which is unequalled in the West.”

Aware that skirmishes had broken out along the Rio Grande in April, and that Mexican forces were preparing to defend California, Frémont decided to return to Mexican territory in mid-May. On May 13, with Mexico enraged by the American annexation of Texas, the United States declared war on its neighbor to the South. It remains unclear when Frémont learned that war had formally broken out, but his instincts proved correct and allowed him to take some of the first actions of the Mexican-American War.

READ MORE: California's Little-Known Genocide

The Bear Flaggers Strike

Bear Flag Revolt, California 1846
Stock Montage/Getty Images
Fremont hoists the grizzly-bear flag of the California Republic as California settlers declare themselves independent of Mexico during the Bear Flag Revolt in Sonoma, California, on June 10, 1846.

Frémont re-entered California in late May and met with a group of American settlers in the Sonoma Valley on June 8. Having refused a Mexican order to leave, the settlers were primed to launch the “spontaneous” revolt Frémont hoped to incite. On June 10, settlers and members of Frémont’s expedition attacked a Mexican lieutenant and made off with his herd of horses. The fighting had begun.

Three days later, a party set out for Sonoma. Riding into the city at dawn, they arrived at the Casa Grande, where Col. Vallejo invited them in to discuss his surrender. Californios had divided opinions about American annexation—many were fiercely resistant—but some felt American rule was preferable to the threat of Russian invasion. Also, a growing number of Californios, Vallejo included, had come to realize that Mexico was simply not willing to put up a fight over Alta California.

After accepting Vallejo’s official surrender, the Americans elected William B. Ide as their leader, declared the foundation of a new republic and hoisted a hastily assembled flag featuring a California grizzly bear over the Sonoma barracks. Though technically named the California Republic, the new nation came to be known as the Bear Flag Republic, and its founders were colloquially known as Bear Flaggers, Bears or Osos (“bears” in Spanish).

READ MORE: 9 Things You May Not Know About California 

25 Days of Independence

Battle of Monterey, 1846, The Mexican American War
Photo12/Universal Images Group/Getty Images
Storming of Independence Hill at the Battle of Monterey, in Monterey, California, on July 7, 1846, during the Mexican-American War. 

For the rest of June, the Bears and Frémont’s men engaged in skirmishes with Mexican forces, seized key points around what is now San Francisco, and rallied more white settlers to their cause.

At the beginning of July, Commodore John Sloat, commander of the U.S. Navy’s Pacific fleet, arrived at Monterey Bay. Like Frémont, he had been ordered to attack as soon as war was declared, but acted upon instinct instead of waiting to hear of an official declaration. The navy seized Monterey on July 7, declaring California a part of the United States. Two days later, the Bear Flag Revolt officially ended as California was absorbed into the union. The Californios formally ceded Alta California in 1847 with the Treaty of Cahuenga. California officially became the 31st state on September 9, 1850.

The American takeover of California replaced the complex racial hierarchies of Mexico with a new hierarchy dominated by white Americans. “In both [California and Texas], you have a new racial system,” Heidenreich says. “People who thought of themselves as Español, or white, are now, many of them, considered Brown—or ‘greasers,’ a term used increasingly in the California papers.” 

Suddenly, Californios became second-class citizens in their own country, while the new government tacitly encouraged its white citizens to purge the area of indigenous peoples.

In 1848, just before California’s formal annexation, gold was discovered in Coloma, near Sacramento. The ensuing gold rush transformed California from a region sparsely populated with Hispanics and Native Americans to a bustling economic center controlled by white Americans—and with many more on the way.

A modified version of the original bear flag became California’s state flag in 1911, roughly a decade before the California grizzly bear went extinct. Though it lasted a total of just 25 days, the California Republic’s name and symbols now adorn perhaps the most distinctive state flag in the United States. 

READ MORE: The U.S. States: 50 States and State Capitals