Ecuador is a patchwork of ethnic, regional and racial 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 conquistadors a century later.
It won independence from Spain in the early 19th century, initially as part of Gran (Great) Colombia and then - after its collapse - as a separate state.
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.
But by the end of the 20th century a combination of factors, including falling oil prices and damage caused by the weather phenomenon El Nino, had driven the economy into recession.
Inflation, which had become the highest in the region, led the government to replace the national currency with the US dollar in an effort to curtail it.Diversification
While the government has moved to diversify the economy away from its dependence on crude oil, growth depends mainly on oil prices.
At a glance
- Politics: Three presidents have been ousted since 1997; current leader Rafael Correa has been elected for a third term and has introduced sweeping left-wing policies
- Economy: Ecuador exports oil but many people live in poverty; indigenous groups oppose free trade policies
- International: Free trade talks with US are frozen; Ecuador has complained of border incursions by the Colombian military
Country profiles compiled by BBC Monitoring
Not all Ecuadorans have benefited equally from oil revenues. The traditionally dominant Spanish-descended elite gained far more than indigenous peoples and those of mixed descent.
Steps to stabilise the economy, such as austerity measures and privatisation, have generated widespread unrest, particularly among the indigenous poor.
Also, efforts to provide impetus to the mining industry has met resistance from the indigenous groups.
Ecuador is the smallest OPEC member and the world's top banana exporter. It is also a big exporter of coffee, shrimp and cocoa.
For a small country, Ecuador has many geographical zones. They include 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.