Vallejo was serving as the personal secretary to the new Governor of California, Luis Argüello, when news of Mexico's independence reached Monterey. Argüello enrolled Vallejo as a cadet in the Presidio company in 1824. After being promoted to corporal, Argüello appointed Vallejo to the "diputación", the territorial legislature. He was promoted to "alférez" (equal to a modern army second lieutenant), and in 1829, Vallejo led a group of soldiers against the Miwoks, under chief Estanislao. After a three-day battle, Vallejo's troops forced the Miwok to flee to Mission San José, seeking refuge with the padres.