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: Guillermo Lasso
A liberal supporter of the free market, Mr Lasso ended 14 years of centre-left rule when he won the 2021 presidential election, narrowly beating his socialist opponent Andes Arauz.
Guillermo Lasso stood unsuccessfully for the presidency in 2013 and 2017 as candidate for his own centre-right CREO party.
With a background in both business and central and provincial government, he has pledged to cut taxes and state debt, and raise productivity and employment in the private sector.
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.