19th century new national borders. The Concert of Europe attempted to preserve this settlement was established to preserve these borders, with limited impact. Most countries in Central America and South America obtained independence from colonial overlords during the 19th century. In 1804, Haiti gained independence from France. In Mexico, the Mexican War of Independence was a decade-long conflict that ended in Mexican independence in 1821. Due to the Napoleonic Wars, the royal family of Portugal relocated to Brazil from 1808-1821, leading to Brazil having a separate monarchy from Portugal. The Federal Republic of Central America gained independence from Spain in 1821 and
History of Costa Rica Following the Mexican War of Independence (1810–1821), Costa Rica became part of the independent Mexican Empire in 1821. Subsequently, Costa Rica was part of the Federal Republic of Central America in 1823, before gaining full independence in 1838. Its economy struggled due to lack of connections with European suppliers. In 1856, Costa Rica resisted United States settlers from mounting a take-over of the government. After 1869, Costa Rica established a democratic government. After the Costa Rican Civil War in 1948, the government drafted a new constitution, guaranteeing universal suffrage and the dismantling of the military. Today, Costa Rica is a