California elected a civilian government (albeit by military order) to organize the state before it was officially formed by the United States Congress in 1850. Sonoma was named the county seat for Sonoma County. About that time the flow of miners had slowed and the U.S. Army was leaving Sonoma. Business in Sonoma moved into a recession in 1851. Surrounding towns such as Petaluma and Santa Rosa were developing and gaining population faster than Sonoma. An 1854 special election moved the county seat and its entailed economic activity to Santa Rosa.