Cartago was the first Spanish settlement in Costa Rica, founded in 1563 by
Juan Vázquez de Coronado. It was the original capital of the country. In 1784 the Spanish government gave San José a tobacco factory and a monopoly over tobacco products. After this, San José became the commercial center of Costa Rica while Cartago retained the political power. By 1801 Costa Rica had a population of about 50,000, most of whom lived in the
Central Valley. Costa Rica was isolated from the outside world, and it took a month for news to arrive of the
Act of Independence of Central America proclaimed on the 15 September 1821 in
Guatemala. In May 1822
Agustín de Iturbide proclaimed himself Emperor of Mexico, with plans to
extend his rule to all of
Central America. The agrarian and aristocratic landowners of Cartago and
Heredia wanted to maintain the privileges they had held under the former Spanish empire. They thought these would be protected under the new Mexican Empire. The liberal merchants of San José and Alajuela wanted to introduce a republican government. They preferred to remain independent of the empire. The leaders of the four towns of the Central Valley met and agreed to remain neutral until the situation became clearer. Gregorio José Ramírez, who had represented the province of Alajuela in the council that decided on the independence of Costa Rica, was hostile to joining the empire. He began to make military preparations. By March 1823 the Superior Governing Council of Costa Rica had still not declared allegiance to the emperor, and the conservatives decided to stage a coup. ==Preamble==