Mexico country profile
Mexico is a nation where affluence, poverty, natural splendour and urban blight rub shoulders.
It has the second-largest economy in Latin America and is a major oil exporter.
But prosperity remains a dream for many Mexicans, and the socio-economic gap remains wide. Rural areas are often neglected and huge shanty towns ring the cities.
Many poor Mexicans have sought to cross the 3,000-km border with the US in search of a job but in recent years more Mexicans immigrants have returned to Mexico than migrated to the US.
Tens of thousands of people have been killed in drugs-related gang violence in the past decade. Powerful cartels control the trafficking of drugs from South America to the US. Security forces ordered to crack down on them have been accused of abusing their power and acting with impunity.
United Mexican States
Capital: Mexico City
Population 116 million
Area 1.96 million sq km (758,449 sq miles)
Major language Spanish
Major religion Christianity
Life expectancy 75 years (men), 80 years (women)
President-elect: Andres Manuel Lopez Obrador
The left-wing, anti-establishment Andres Manuel Lopez Obrador won an overwhelming victory in the July 2018 presidential election.
He said his priority was to tackle corruption - which he blames for social inequality as well as the violence afflicting Mexico.
He wants to ensure that Mexicans are happy in their home country and don't have to migrate out of necessity.
He is a former mayor of Mexico City and competed in the race for president twice before.
Outgoing president: Enrique Pena Nieto
The once dominant Institutional Revolutionary Party returned to power in 2012 with a clear win in presidential elections by Enrique Pena Nieto.
Having promised major changes to the way Mexico is run, Mr Pena Nieto has pushed ground-breaking reforms, including closing corporate tax loopholes, liberalising the telecoms industry and opening the longstanding state energy monopoly to private competition.
But rampant gang violence, corruption and the weak state authority remain festering sores, feeding growing public disenchantment.
Reporters Without Borders describes Mexico as "one of the hemisphere's most dangerous countries" for the media.
Drug cartels and corrupt officials are implicated in most of the crimes of violence against journalists, which almost always go unpunished.
Two big players, Televisa and TV Azteca, dominate the TV sector.
Mexico is one of Latin America's biggest internet markets.
Some key dates in Mexico's history:
1519 - Spanish army led by Hernan Cortes lands at Veracruz, marking the start of Spain's conquest of Mexico.
1521-1820 - Mexico forms part of the Viceroyalty of New Spain.
1810-21 - War of Independence ends with the creation of the short-lived Mexican Empire, which includes Central America to the southern border of modern-day Costa Rica, as well as what is now the south-western US.
1824 - Mexico becomes a federal republic. Central American provinces secede.
1846-8 - Mexican-American War ends with Mexico being forced to sell its northern provinces (including modern-day California, Nevada, New Mexico, Arizona and Utah) to the US.
1910-1920 - Mexican Revolution leads to establishment of a constitutional republic.
1929 - Formation of the National Revolutionary Party, which later becomes the Institutional Revolutionary Party, or PRI, which dominates politics until 2000.
1968 - Student demonstration in Mexico City during the Olympic Games is fired upon by Mexican security forces. Hundreds of protesters are killed or wounded.
1976 - Huge offshore oil reserves discovered.
1994 - Zapatista rebels, led by the charismatic Subcommander Marcos, rise up demanding improved rights for some 10 million Indians in Mexico, four million of whom live in Chiapas.
2000 - Vicente Fox breaks ruling PRI party's seven-decade dominance by winning presidential election.
2006 - President Felipe Calderon launches crackdown on drug gangs, with violence escalating into a national security crisis.
2014 - Global outcry after 43 students go missing in the city of Iguala in southwest Mexico.