
Establishment of an independent Nicaragua came in stages. The first stage occurred in 1821 when the Captaincy General of Guatemala formally declared its independence from Spain on September 15, which is still celebrated as independence day. At first the captaincy general was part of the Mexican Empire under General AgustÃn de Iturbide, but efforts by Mexico to control the region were resisted all over Central America. Separatist feelings throughout the isthmus grew, however, and five of the United Provinces of Central America--Costa Rica, El Salvador, Guatemala, Honduras, andd Nicaragua--declared their independence from Mexico in July 1823. The sixth province, Chiapas, opted to remain with Mexico. Under a weak federal government, each province created its own independent internal administration. Inadequate communication and internal conflicts, however, overshadowed efforts to institutionalize the federation for the next decade and a half. Efforts to centralize power led to civil war between 1826 and 1829. The federation finally dissolved in 1837, and a Constituent Assembly formally declared Nicaragua's independence from the United Provinces of Central America on April 30, 1838.