a series of governors were installed and replaced beginning in 1828 with the appointment of federalist manuel dorrego as the governor of buenos aires. however, dorrego's government was very soon overthrown and replaced by that of unitarist juan lavalle. lavalle's rule ended when he was defeated by a militia of "gauchos" led by rosas. by the end of 1829, the legislature had appointed rosas as governor of buenos aires. under rosas's rule, many intellectuals fled either to chile, as did sarmiento, or to uruguay, as sarmiento himself notes.