when the bases of the union of Costa Rica to the First Mexican Empire were dictated it established: ""they will include for their benefit the party of Guanacaste and Nicoya in the part that they claim and want to adopt by the identity of interest, in which case the northern part of the province in that part, will be the one that has recognized that party on the mountain of Nicaragua". The creation of the First Mexican Empire by Agustín de Iturbide in 1821 provoked the appearance of imperialist and republican factions, confronting each other, in several countries of the isthmus. In the case of Nicaragua, this was reflected in the struggle for local power between the cities of León and Granada, which struggled for much of the nineteenth century. In 1823, two years after independence, there was an uprising against the conservative government in Nicaragua. This rebellion, led by the liberal José Anacleto Ordóñez Bermúdez, was a consequence of the intention of the conservatives to annex the country to the Mexican Empire of Agustín de Iturbide. The uprising of Ordóñez continued despite the dissolution of the Mexican Empire, with new uprisings in 1824 led by Leon Méndez and Domingo Galarza, and then another blow from Ordóñez. This situation of internecine wars and coups d'etat was prolonged with the war between Argüello y Cerda (1827–29), and later with several uprisings that will culminate in 1855 with the National War of Nicaragua. In the case of Costa Rica, there was a short civil war in April 1823, which was settled with the Republican victory, so that on the eve of the annexation, Costa Rica showed a more stable outlook than Nicaragua. In 1823, the Costa Rican lawyer and deputy to the Central American Federal Congress, Pedro Zeledón Mora, stated in a letter dated in León, Nicaragua, the convenience of incorporating Nicoya to Costa Rica: "(...)it is very advantageous because of the increase in land and other utilities, without prejudice to it (Nicaragua), which neither makes nor will make use of it.". Economical During the colonial period, the province of Costa Rica had a precarious economic existence. With the purpose of strengthening it, the Spanish authorities decided the incorporation of the Nicoya Corregimiento to Costa Rica during part of the 16th century. During the 17th and 18th centuries, the communities that inhabited both sides of the Gulf of Nicoya had an active