The area occupied by today's Mexico was settled as early as 10000 BC, many remains of ancient settlers (one of the most famous, the Man of Tepexpan) have been found and dated to that time.
Today's Mexico was the site were several advanced Amerindian civilizations like the Mayan, Olmec, Toltec and Aztec cultures developed and flourished. The prevalent cultures were invaded and conquered by Spain, in 1521. The conquerors were led initialy by Hernan Cortes, who entered the country in 1517 from the port known back then as Puerto de la Villa Rica de la Vera Cruz (today's Veracruz). The Aztecs, the dominant native people in the country back then, believed (according to ancient myths) that the Spanish conquerors were people sent by the gods, so they offered little resistance initially to the advances of the conquerors, but, eventually, they opposed them when it became evident that they were not gods. After several battles where the Spanish forces were close to be defeated, the conquerors finally surrounded and kept siege on the inhabitants of Tenochtitlan, then capital of the Aztec Empire, until their total defeat in 1521.
With the conquest a new race was born: the mestizo race, as a result of the conquerors taking native women and beginning the mixing of both cultures.
During the colonial period, that lasted from 1521 to 1821, Mexico was known as "Nueva España" or "New Spain" whose territories included today's Mexico and a similar sized area located in most of what is today's southern United States.
The war for independence started in 1810, and was spearheaded by Miguel Hidalgo, a priest of Spanish descent and of progressive ideas. The war lasted 11 years until the troops of the liberating army entered Mexico City in 1821 (Spain was finally expelled from Mexican territory a few years later). Although independence was first proclaimed in September 16, 1810, the republic was not established until 1824. The first form of government was a monarchy, with Agustin de Iturbide, a former Spanish general, proclaming himself emperor. In 1824 "Guadalupe Victoria" became the first president of the new country. Guadalupe Victoria was not his real name, but it was a name specially chosen: Guadalupe to thank for the protection of Our Lady of Guadalupe, and Victoria which means Victory.
Many presidents came and went, which brought a long period of instability that lasted most of the XIX century. During this period, many of the territories in the north were lost to the USA. They were either sold dirt cheap by means of cohercion, or lost in bloody battles against the USA. One of the memorable battles is when the USA invaded Mexico in 1847, and the Heroic Military College fought against experienced soldiers (September 13, 1847).
From its birth, Mexican people were sharply divided in the kind of goverment they wanted, some preferred a monarchical form of government (conservatives), while others preferred a republic (liberals). Conservatives tried to institute a monarchy when they helped to bring to Mexico an archduke from the Royal House of Austria, known as Maximilian of Habsburg (wife Carlota of Habsburg) with the military support of France, who was interested in exploiting the rich mines in the north-west of the country. Although the French, then considered one of the most efficient armies of the world, suffered an initial defeat in The Cinco de Mayo (may 5th, 1862) battle in Puebla they eventually defeated the Mexican goverment forces leaded by the general Ignacio Zaragoza and enthroned Maximilian as Emperor of Mexico. Unfortunately for the conservatives, Maximilian of Habsburg favored the establishment of a Republic, and a liberal way of government. Maximilian was eventually captured and executed in the Cerro de las Campanas, Queretaro by the forces loyal to President Benito Juarez, who kept the Federal goverment functioning during the French intervention that put Maximilian in power. In 1857, the republic was restored, and a new constitution was written, that amongst other things, confiscated the goods of the Catholic church, established civil marriages and forbade the participation of priests in politics (separation of Church and State).
After the victory, there was resentment against President Juarez (who began to concentrate too much power and wanted to be re-elected) so one of the army's generals, named Porfirio Diaz rebeled against the goverment with the proclamation of the Plan de Tuxtepec (1876).
Porfirio Diaz became the new president. During the period of more than 30 years (1876 - 1911) while he was the strong man in Mexico, the country's infrastructure improved a lot thanks to the investments of other countries. This period of relative prosperity and peace is known as the Porfiriato. But the people was not happy with the form of government during the Porfiriato: It was attracting investors because the pay for workers was very low, which made a very steep social division: only a small bunch of investors (national and international) were getting rich, but the vast majority of the people remained in abject poverty. Democracy was completely supressed, dissent was dealt in repressive, often brutal ways.
All this inspired Francisco I. Madero to prepare a document known as the Plan de San Luis, in which he called the Mexican people to take their weapons and fight against the government of Porfirio Diaz on November 20, 1910. This started what is known as the Mexican Revolution (Revolucion Mexicana). Madero was incarcerated in San Antonio, Texas, but his plan took effect in spite of him being in jail. The Federal Army was defeated by the revolutionary forces which were lead amongst others by Emiliano Zapata, in the South, Pancho Villa and Pascual Orozco in the North, and Venustiano Carranza, this forced Porfirio Diaz to resign for the "sake of the peace of the nation" and to exile himself in France where he died (1914).
The revolution leaders had many different objectives, and, as a consequence, it probed very difficult to reach agreements of how to organize the goverment that emanated from the triumphant revolutionary groups. The result of this was a struggle for the control of Mexico's goverment in a conflict that lasted more than 20 years. Venustiano Carranza, a former revolutionary general who became one of the several presidents during this turbulent period, promulgated a new Constitution on February 5, 1917. This is the constitution that still guides Mexico.
In the 20s and 30s there was another civil war called "la Guerra Cristera" that was fought on religious issues. The government, formed by old veterans from the revolution, created a party called the PNR, who later became the PRI (Partido Revolucionario Institucional) that ruled the country for the rest of the XX century.
After many power struggles (that saw assasinated Presidents Francisco I. Madero (1911), Venustiano Carranza (1920) and former revolutionary leaders Emiliano Zapata (1919) and Francisco Villa(1923)) amongst many others, President Lazaro Cardenas came to power in 1934 and transfomed Mexico from its foundations: he exiled the last general with dictatorial ambitions, managed to unite the different forces that fought and resulted from the revolution under the umbrella of the Partido Revolucionario Institucional (Institutional Revolutionary Party, usualy refered as PRI), he set the rules (written or otherwise) that allowed this party to rule unchallenged for decades to come without internal fights that could jeopardize the peace that was finally reached, nationalized the oil industry in 1938, the electric industry, created the National Politechnic Institute, granted assylum to Spanish expatriates fleeing the Spanish Civil War, started the land reform, started the distribution of free text books for children, and, in general, pursued policies that for good or bad marked the development of Mexico until the present day.
Although PRI regimes achieved economic growth and relative prosperity during almost three decades after WWII the management of the economy colapsed several times. In the 70s, things started to look not-so-bright, economic crisis affected the country in 1976 and 1982 after which the banks were nationalized after being singled out for the economic problems. In both ocassions the mexican peso devaluated, and ever since, it was normal to expect a big devaluation and a recession period after each presidential period ended (every 6 years). The crisis that came after a devaluation of the peso in late 1994 threw Mexico into economic turmoil, triggering the worst recession in over half a century.
After the 1988 election, which was very disputed and arguably lost by the goverment party, the IFE (Instituto Federal Electoral - Federal Electoral Institute) was created in the early 90s. It is run by normal citizens, and it oversees that elections are conducted legally and fairly. As a result of this, the presidential candidate of the PAN (Partido Accion Nacional, National Action Party) Vicente Fox Quezada won the federal election of July 2, 2000, and both chambers of congress are composed by members of several different parties of all political persuasions.
Mexico continues to make an impressive recovery due to a very agressive plan to make the Mexican economy an exporting one (although extremely dependent on the US economy) and real Democracy is taking hold in most of the country with governors of different parties in the states (including a left leaning one in Mexico City).
Ongoing economic and social concerns include low real wages, underemployment for a large segment of the population, inequitable income distribution, resistance to democratic change in old PRI strongholds, and few advancement opportunities for the largely Amerindian population in the impoverished southern states.