Ecuador country profile
Ecuador is a patchwork of ethnic identities, a complex legacy of its indigenous and colonial past.
Long the heartland of a series of native Andean civilisations, it was taken over by the Peru-centred Inca Empire in the 15th century, and then Spanish conquerors a century later.
It won independence from Spain in the early 19th century.
Traditionally a farming country, Ecuador's economy was transformed after the 1960s by the growth of industry and the discovery of oil. There was rapid growth and progress in health, education and housing.
Ecuador has many geographical zones, including Andean peaks, tropical rainforests and - 1,000km (600 miles) off the coast - the volcanic Galapagos Islands, home to the animals and birds whose evolutionary adaptations shaped Charles Darwin's theories.
President-elect: Lenin Moreno
Outgoing president: Rafael Correa Delgado
Left-wing economist Rafael Correa was elected president for a third consecutive term in 2013.
When he originally took up his post in January 2007 he joined Latin America's club of left-leaning leaders, including Venezuelan President Hugo Chavez and Bolivia's Evo Morales, who have been highly critical of the US and led a South American nationalisation drive.
Journalists and media outlets face a hostile political and legal environment, press freedom groups say.
Laws give the government powers to regulate editorial content and impose sanctions.
Radio is a popular medium; there are hundreds of stations, some operating in indigenous languages. Soap operas and US series are staple fare on TV.
Some key dates in Ecuador's history:
1534 - Spanish conquer Ecuador.
1822 - Ecuador becomes part of independent Gran Colombia, which also encompasses Colombia, Panama and Venezuela. Ecuador becomes fully independent in 1830.
1934 - Dr Jose Maria Velasco Ibarra is elected president. In the next 30 years, he will be elected president five times and overthrown four times.
1941 - Peru invades and the next year Ecuador cedes some 200,000 square kilometres of disputed territory to Peru.
1968 - Election returns Velasco to power. Two years later, amid a financial crisis, Velasco suspends the constitution and rules by decree. Four years later he is deposed in a coup.
1972 - Oil production starts and Ecuador emerges as a significant oil producer.
1979 - Democracy restored.
1995 - Brief border war with Peru.
1997 - 2 million people march through Quito demanding the resignation of President Abdala Bucaram Ortiz after some prices rise by 600%. Congress votes to dismiss him for mental incompetence.
2006 - Socialist Rafael Correa wins presidential election, launches social reform programme to alleviate poverty and extend state ownership of the oil industry.