The Sonoma Barracks (El Cuartel de Sonoma) is a two-story, wide-balconied, adobe building facing the central plaza of the City of Sonoma, California. It was built by order of Lieutenant (Teniente) Mariano Guadalupe Vallejo to house the Mexican soldiers that had been transferred from the Presidio of San Francisco in 1835. The Presidio Company and their commander, Lieutenant Vallejo, were also responsible for controlling the Native Americans living on the northern border of Mexican California.
On June 14, 1846 the Pueblo of Sonoma was taken over by a group of American immigrants seeking to establish their own California Republic. The Barracks became the headquarters this short-lived insurrection later known as the Bear Flag Revolt.
Believing that war with Mexico had been declared, ships of the U.S. Pacific Squadron took over Monterey on July 7 and Yerba Buena (now San Francisco) on July 9, 1846. The U. S. flag was raised at the Barracks that same day – ending the California Republic and the Bear Flag Revolt. After that, the Barracks was used by U.S. forces until 1852. Throughout the Mexican–American War and the subsequent California Gold Rush these forces continued to confront Native Americans hostile to invaders occupying their lands.
When the military left, the building was used for a number of civilian purposes until being acquired by the State of California in 1957. The Sonoma Barracks is now part of Sonoma State Historic Park. Wikipedia