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
Latin American wars of independence movement against their colonial master, finally ended as a full-fledged civil war. Traditionally, the process is divided into three stages: Patria Vieja, Reconquista, and Patria Nueva. The first uprising against Spanish rule took place in 1809, and criollos in Ecuador set up a junta on September 22, 1810 to rule in the name of the Bourbon monarch; but as elsewhere, it allowed assertion of their own power. Only in 1822 did Ecuador fully gain independence and became part of Gran Colombia, from which it withdrew in 1830. At the Battle of Pichincha, near present-day Quito, Ecuador on May 24, 1822,