The Spanish influence was both positive and negative. The Spanish introduced their language, cattle, crops and Roman Catholicism; architecture became a blend of colonial and indigenous artistic influences. The indigenous people were subjected into a forced labor system, and illnesses brought by the Spanish ravaged the population. African slaves were brought to Ecuador to work on cocoa and sugar plantations in the coastal province of Esmeraldas.
The Spanish were eventually deposed. On May 24,1822, Antonio José de Sucre defeated Spanish royalists on the flanks of Pichincha Volcano, in the Battle of Pichincha. Ecuador briefly joined Simón Bolívar's Gran Colombia with Colombia and Venezuela before achieving complete independence in 1830, when it became the Republic of Ecuador, with Quito as the capital.