<P> Central America is composed of seven independent nations: Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua, and Panama . After the Spanish conquest in the 16th century, most of the inhabitants of Central America shared a similar history . The exception was the Western Caribbean Zone, which included the Caribbean coast and encompassed both semi-independent indigenous polities, runaway slave communities, and settlers, especially British settlers who would eventually form British Honduras (the modern - day nation of Belize), a sparsely populated area that was inhabited by the British through the Treaty of Madrid from Spain . When Spain failed to regain control over British Honduras, the British continued to inhabit the country, and eventually colonized it . When Guatemala gained its independence, they assumed inheritance of British Honduras from Spain . British Honduras had been a British settlement, not a colony (the treaty between Spain and The United Kingdom prohibited British colonies in the territory) for several years . After many years of controversy, a treaty was signed between Guatemala and the United Kingdom in which the Guatemalan President of the time recognized the original territory (granted by the kingdom of Spain to the British Crown) of Belize . Within this treaty, was also an agreement for a cart road to be built from Guatemala City through British Honduras to the Caribbean Sea . Since the cart road was never built, Guatemala declared the treaty null and void . British Honduras, as the British called it, and Belize as the Spaniards and Guatemalans said, gained its independence from Great Britain in 1981 and adopted the name "Belize". Guatemala still disputes the Belizean territory . </P> <P> From the 16th century through 1821, Central America formed the (Captaincy General of Guatemala), sometimes known also as the Kingdom of Guatemala, composed by a part of the state of (Chiapas) (nowadays part of Mexico), Guatemala, El Salvador, Honduras, Nicaragua, and Costa Rica . Officially, the Captaincy was part of the Vice royalty of New Spain and therefore under the supervision of the Spanish viceroy in Mexico City . It was, however, administered not by the viceroy or his deputies, but by an independently appointed Captain General headquartered first in Antigua and later in Guatemala City . </P> <P> In 1811, independence movements broke out in El Salvador in reaction to events in the Peninsular War, and again in 1814 after the restoration of Ferdinand VII . Both revolts were easily suppressed and the political unrest was subsumed into the general political process in the Spanish world that led to the Spanish Constitution of 1812 . Between 1810 and 1814, the Captaincy General elected seven representatives to the Cádiz Cortes, in addition to forming a locally - elected Provincial Deputation . In 1821 a congress of Central American Criollos in Guatemala City composed the Act of Independence of Central America to declare the region's independence from Spain, effective on 15 September of that year . That date is still marked as independence day by most Central American nations . The Spanish Captain General, Gabino Gaínza, sympathized with the rebels and it was decided that he should stay on as interim leader until a new government could be formed . Independence was short - lived, for the conservative leaders in Guatemala welcomed annexation by the First Mexican Empire of Agustín de Iturbide on 5 January 1822 . Central American liberals objected to this, but an army from Mexico under General Vicente Filisola occupied Guatemala City and quelled dissent . </P> <P> When Mexico became a republic the following year, it acknowledged Central America's right to determine its own destiny . On 1 July 1823, the congress of Central America declared absolute independence from Spain, Mexico, and any other foreign nation, including North America and a Republican system of government, was established . </P>

Why did central america declare independence from spain
find me the text answering this question