In early 1822, the authorities of the newly independent Central American provinces, meeting in Guatemala City, voted to join the newly constituted First Mexican Empire under Agustín de Iturbide. El Salvador resisted, insisting on autonomy for the Central American countries. A Mexican military detachment marched to San Salvador and suppressed dissent, but with the fall of Iturbide on 19 March 1823, the army decamped back to Mexico. Shortly thereafter, the authorities of the provinces revoked the vote to join Mexico, deciding instead to form a federal union of the five remaining provinces. (Chiapas permanently joined Mexico at this juncture.) When the Federal Republic of Central America dissolved in 1841, El Salvador maintained its own government until it joined Honduras and Nicaragua in 1896 to form the Greater Republic of Central America, which dissolved in 1898.