The coastal region and the high Andean basins of what is now Ecuador were inhabited by Indian tribes when the first Europeans reached the area's Pacific coast in 1526. The Inca Empire extended over the highland region to an area near to Quito. The first Spanish settlement in Ecuador was established in 1534 at Quito on the site of an important Inca town of the same name. Another settlement was established four years later near the mouth of the river Guayas on the site of Guayaquil. Expeditions initaited by Francisco Pizarro, who discovered and conquered Peru, founded the settlements and extended Spanish rule over the highland basins and coastal lowlands. Ecuador was part of the Viceroyalty of Peru until 1740, when it was transferred to the Viceroyalty of New Granada (together with Colombia and Venezuela). With hardly any gold or silver, Ecuador did not attract many Europeans settlers during the Spanish colonial period, which lasted until 1822.
The first uprising against Spanish rule took place in 1809, but only in 1822 did Ecuador gain independence as part of the Federation of Gran Colombia, from which it withdrew in 1830. A long period of strife and instability followed, caused mainly by struggles between conservative and liberal elements, clerical and anticlerical movements, and large landowners and owners of small farms or platations. The country was run by dictators, and the army palyed an important role in internal politics. During the first century of its independence, Ecuador had changed its contitutions 13 times and only few of its presidents had managed to serve a full four-year term.
The economic development associated with the cocoa boom at the end of the nineteenth and the first querter of the twentieth century helped to improve and stabilize the country's administration, despite the frequent turnover in rulers -18 presidents between 1897 and 1934- and 25 presidents between 1934 and 1988.