In September 1830, Ecuador declared independence and seceded from Greater Colombia. The new republic's president became General Juan José Flores (1800-1864), a Venezuelan who had been part of the army of Simon Bolivar (1783-1830).
Flores instituted a highly autocratic constitution and dominated the country, with the aid of an army composed mainly of foreign soldiers. Flores' capital was Quito, in the mountains, a conservative city that supported his rule. The more liberal seaport of Guayaquil became the focal point of opposition to his rule. In 1834, the coastal region rose in arms against Flores, under the leadership of Vicente Rocafuerte (1783-1847), whose stated purpose was to evict the foreigners, including Flores.
Though Flores retained control and even managed to jail Rocafuerte briefly, a compromise was reached, whereby the two should take turns in the presidency. Thus, in 1835, Rocafuerte became president, and Flores became commander of the army.