History
For almost 3,000 years, Mexico was the site of several Mesoamerican Native American civilizations, such as the Olmec, the Maya and the Aztecs. The arrival of the Spanish in the early 16th century, and their defeat of the Aztecs in 1521, marked the beginning of the 300 year-long colonial period of Mexico as New Spain.
On September 16, 1810, independence from Spain was declared, by Miguel Hidalgo y Costilla, a Catholic priest in the small town of Dolores, causing a long war that eventually led to independence in 1821 and the creation of the First Mexican Empire.
After independence, Spanish possessions in Central America were all incorporated into Mexico from 1822 to 1823, when they declared independence, with the exception of Chiapas.
Soon after achieving its independence from Spain, the Mexican government, in an effort to populate its sparsely-settled hinterlands, granted Stephen F. Austin permission to settle hundreds of immigrant families in a remote area of the northernmost state of Coahuila y Texas, on condition that the settlers convert to Catholicism and swear loyalty to the government of Mexico. It also forbade the importation of slaves, a condition that, like the others, was largely ignored.
The Empire soon fell to rebellious republican forces led by Antonio López de Santa Anna. The first Republic was formed with Guadalupe Victoria as its first President, followed in office by Santa Anna. As president, in 1834 Santa Anna abrogated the republican consititution, causing insurgencies in the southern state of Yucatán and the northernmost portion of the northern state of Coahuila and Texas. Both areas sought independence from the Mexican government. While the republican army, led again by Santa Anna, quickly quelled the revolt in Yucatán, then turned to the northern rebellion. The inhabitants of Texas, calling themselves Texians and led mainly by relatively recently-arrived English-speaking settlers, declared independence from Mexico at Washington on the Brazos, giving birth to the Republic of Texas (settlers from the United States began to arrive in 1821).
The insurrection led to the Texas Revolution. Texas won its independence in 1836, further reducing the territory of the fledgling republic. In the 1840s, the country was invaded and defeated by the United States, which demanded and received roughly one-third of the remaining territory of Mexico, from which were formed the modern states of California, Nevada, and Utah, and most of Arizona, New Mexico, and Colorado (see Mexican-American War).
In the 1860s the country again suffered a military occupation, this time by France, seeking to establish the Hapsburg Archduke Ferdinand Maximillian of Austria as Emperor of Mexico, with support from the Roman Catholic clergy and conservative Creoles. This Second Mexican Empire was fought off by then-president of the Republic, the Zapotec Indian Benito Juárez, with diplomatic and logistical support from the United States and the military expertise of General Porfirio Díaz, also of part Amerindian heritage. General Ignacio Zaragoza defeated the French Army (arguably the most powerful in the world at the time) at the city of Puebla on May 5, 1862 (celebrated as el Cinco de Mayo ever since), though after his death the city was lost in early 1863 following a renewed French attack which penetrated as far as Mexico City, forcing President Juárez to organize an itinerant government. Napoleon III of France, Emperor of France, imposed Maximilian as Emperor of Mexico from 1864 to 1867. In mid-1867, following repeated losses in battle to the Republican ("Liberal") Army, Maximilian was captured and executed, along with his last loyal generals, in Querétaro. From then on, Juárez remained in office until his death in 1872.
After Juárez's death, Mexico experienced economic growth under the conservative and pro-European rule of Porfirio Díaz. Foreign investment allowed the development of the oil industry and the construction of the railroad system all across the country. This period of relative peace and prosperity is known as the "Porfiriato". His mandate, however, was mostly undemocratic and benefited the middle and upper classes, while the Amerindian indigenous population continued to live in precarious conditions. Growing social inequalities, restricted freedom of the press, and his insistence to be reelected for a fifth term led to massive protests. His fraudulent victory in the 1910 elections sparked the Mexican Revolution. Revolutionary forces defeated the federal army, but were left with internal struggles, leaving the country in conflict for two more decades. The creation of the National Revolutionary Party (which later became the Institutional Revolutionary Party or PRI), in 1929 ended the struggles, uniting all generals and combatants of the revolution.
During the next four decades Mexico experienced impressive economic growth, and historians call this period "El Milagro Mexicano", the Mexican Miracle. However the management of the economy collapsed several times afterwards. Accused many times of fraud, the PRI's candidates held posts of almost all public offices until the end of the 20th century. It wasn't until the 1980s that the PRI lost the first state governorship, an event that marked the beginning of the party's loss of hegemony. Through the electoral reforms started by president Carlos Salinas de Gortari and consolidated by president Ernesto Zedillo, by the mid 1990s the PRI had lost its majority in Congress. In 2000, and after 70 years, the PRI lost in the celebrated presidential elections to a candidate of the National Action Party (PAN), Vicente Fox.
Info retrieved from wikipedia.org