Ecuador withdrew from Greater Colombia in September 1830 and became an independent republic under the presidency of General Juan Jose Flores (1800-64), a Venezuelan who had come to Ecuador with the liberating army of Simon Bolivar (1783-1830) and who now maintained his power under the autocratic constitution of 1830 with an army composed mainly of foreign soldiers. Flores ruled from the mountain city of Quito, composed of a largely conservative populace, while discontent brewed in the seaport of Guayaquil, populated by numerous liberals. An uprising began in 1834 in the coastal region under Vicente Rocafuerte (1783-1847) and aimed at removing the foreigners, including Flores. The latter remained in control, briefly jailed Rocafuerte, and then agreed that they should take turns in the presidency. In 1835, Rocafuerte became president and Flores became commander of the army.