The city of Mexico-
Tenochtitlan was founded by the
Mexica people in 1325. The old Mexica city that is now simply referred to as
Tenochtitlan was built on an island in the center of the inland lake system of the
Valley of Mexico, which it shared with a smaller city-state called
 According to legend, the Mexicas' principal god,
Huitzilopochtli, indicated the site where they were to build their home by presenting an eagle perched on a
nopal cactus with a snake in its beak.
Between 1325 and 1521, Tenochtitlan grew in size and strength, eventually dominating the other city-states around Lake Texcoco and in the Valley of Mexico. When the Spaniards arrived, the
Aztec Empire had reached much of
Mesoamerica, touching both the Gulf of Mexico and the Pacific Ocean.
After landing in
Veracruz, Spanish explorer
Hernán Cortés advanced upon Tenochtitlan with the aid of many of the other native peoples,
 arriving there on November 8, 1519.
 Cortés and his men marched along the causeway leading into the city from
Iztapalapa, and the city's ruler,
Moctezuma II, greeted the Spaniards; they exchanged gifts, but the camaraderie did not last long.
 Cortés put Moctezuma under
house arrest, hoping to rule through him.
Tensions increased until, on the night of June 30, 1520 – during a struggle known as "
La Noche Triste" – the Aztecs rose up against the Spanish intrusion and managed to capture or drive out the Europeans and their
 Cortés regrouped at Tlaxcala. The Aztecs thought the Spaniards were permanently gone, and they elected a new king,
Cuitláhuac, but he soon died; the next king was
Cortés began a
siege of Tenochtitlan in May 1521. For three months, the city suffered from the lack of food and water as well as the spread of
smallpox brought by the Europeans.
 Cortés and his allies landed their forces in the south of the island and slowly fought their way through the city.
 Cuauhtémoc surrendered in August 1521.
 The Spaniards practically razed Tenochtitlan during the final siege of the conquest.
Cortés first settled in
Coyoacán, but decided to rebuild the Aztec site to erase all traces of the old order.
 He did not establish a territory under his own
personal rule, but remained loyal to the Spanish crown. The first Spanish
viceroy arrived in Mexico City fourteen years later. By that time, the city had again become a
city-state, having power that extended far beyond its borders.
Although the Spanish preserved Tenochtitlan's basic layout, they built
Catholic churches over the old Aztec temples and claimed the imperial palaces for themselves.
 Tenochtitlan was renamed "Mexico" because the Spanish found the word easier to pronounce.
Growth of colonial Mexico City
The city had been the capital of the Aztec empire and in the colonial era, Mexico City became the capital of
New Spain. The
viceroy of Mexico or vice-king lived in the viceregal palace on the main square or
Mexico City Metropolitan Cathedral, the seat of the Archbishopric of New Spain, was constructed on another side of the Zócalo, as was the archbishop's palace, and across from it the building housing the City Council or ayuntamiento of the city.
A famous late seventeenth-century painting of the Zócalo by
Cristóbal de Villalpando depicts the main square, which had been the old Aztec ceremonial center. The existing central place of the Aztecs was effectively and permanently transformed to the ceremonial center and seat of power during the colonial period, and remains to this day in modern Mexico, the central place of the nation.
The rebuilding of the city after the siege of Tenochtitlan was accomplished by the abundant indigenous labor in the surrounding area. Franciscan friar
Toribio de Benavente Motolinia, one of the
Twelve Apostles of Mexico who arrived in New Spain in 1524, described the rebuilding of the city as one of the afflictions or plagues of the early period:
The seventh plague was the construction of the great City of Mexico, which, during the early years used more people than in the construction of Jerusalem. The crowds of laborers were so numerous that one could hardly move in the streets and causeways, although they are very wide. Many died from being crushed by beams, or falling from high places, or in tearing down old buildings for new ones.
Preconquest Tenochtitlan was built in the center of the inland lake system, with the city reachable by canoe and by wide causeways to the mainland. The causeways were rebuilt under Spanish rule with indigenous labor.
Colonial Spanish cities were constructed on a grid pattern, if no geographical obstacle prevented it. In Mexico City, the Zócalo (main square) was the central place from which the grid was then built outward. The Spanish lived in the area closest to the main square in what was known as the traza, in orderly, well laid-out streets. Indian residences were outside that exclusive zone and houses were haphazardly located.
Spaniards sought to keep Indians separate from Spaniards but since the Zócalo was a center of commerce for Indians, they were a constant presence in the central area, so strict segregation was never enforced.
 At intervals Zócalo was where major celebrations took place as well as executions. It was also the site of two major riots in the seventeenth century, one in 1624, the other in 1692.
The city grew as the population did, coming up against the lake's waters. As the depth of the lake water fluctuated, Mexico City was subject to periodic flooding. A major labor draft, the desagüe, compelled thousands of Indians over the colonial period to work on infrastructure to prevent flooding. Floods were not only an inconvenience but also a health hazard, since during flood periods human waste polluted the city's streets. By draining the area, the mosquito population dropped as did the frequency of the diseases they spread. However, draining the wetlands also changed the habitat for fish and birds and the areas accessible for Indian cultivation close to the capital.
The 16th century saw a proliferation of churches, many of which can still be seen today in the
 Economically, Mexico City prospered as a result of trade. Unlike Brazil or
Peru, Mexico had easy contact with both the Atlantic and Pacific worlds. Although the Spanish crown tried to completely regulate all commerce in the city, it had only partial success.
The concept of
nobility flourished in New Spain in a way not seen in other parts of the Americas. Spaniards encountered a society in which the concept of nobility mirrored that of their own. Spaniards respected the indigenous order of nobility and added to it. In the ensuing centuries, possession of a
noble title in Mexico did not mean one exercised great political power, for one's power was limited even if the accumulation of wealth was not.
 The concept of nobility in Mexico was not political but rather a very conservative Spanish social one, based on proving the worthiness of the family. Most of these families proved their worth by making fortunes in New Spain outside of the city itself, then spending the revenues in the capital, building churches, supporting charities and building extravagant palatial homes. The craze to build the most opulent residence possible reached its height in the last half of the 18th century. Many of these palaces can still be seen today, leading to Mexico City's nickname of "The city of palaces" given by
Alexander Von Humboldt.
Grito de Dolores ("Cry of Dolores"), also known as El Grito de la Independencia ("Cry of Independence"), marked the beginning of the Mexican War of Independence. The Battle of Guanajuato, the first major engagement of the insurgency, occurred four days later. After a decade of war, Mexico's independence from Spain was effectively declared in the Declaration of Independence of the Mexican Empire on September 27, 1821.
 Unrest followed for the next several decades, as different factions fought for control of Mexico.
Mexican Federal District was established by the new government and by the signing of their new constitution, where the concept of a
federal district was adapted from the
United States Constitution.
 Before this designation, Mexico City had served as the
seat of government for both the
State of Mexico and the nation as a whole.
Texcoco and then
Toluca became the capital of the State of Mexico.
The Battle of Mexico City in the U.S.–Mexican War of 1847
Battle for Mexico City was the series of engagements from September 8 to 15, 1847, in the general vicinity of Mexico City during the
U.S. Mexican War. Included are major actions at the battles of
Molino del Rey and
Chapultepec, culminating with the fall of Mexico City. The U.S. Army under Winfield Scott scored a major success that ended the war. The American invasion into the Federal District was first resisted during the
Battle of Churubusco on August 8 where the
Saint Patrick's Battalion, which was composed primarily of Catholic Irish and German immigrants, but also Canadians, English, French, Italians, Poles, Scots, Spaniards, Swiss, and Mexican people, fought for the Mexican cause repelling the American attacks. After defeating the
Saint Patrick's Battalion, the Mexican–American War came to a close after the United States
combat units deep into
Mexico resulting in the capture of Mexico City and
Veracruz by the
U.S. Army's 1st, 2nd, 3rd and 4th
 The invasion culminated with the storming of
Chapultepec Castle in the city itself.
During this battle, on September 13, the 4th Division, under
John A. Quitman, spearheaded the attack against Chapultepec and carried the castle. Future
George E. Pickett and
James Longstreet participated in the attack. Serving in the Mexican defense were the cadets later immortalized as
Los Niños Héroes (the "Boy Heroes"). The Mexican forces fell back from Chapultepec and retreated within the city. Attacks on the Belén and San Cosme Gates came afterwards. The
treaty of Guadalupe Hidalgo was signed in what is now the far north of the city.
Porfirian era (1876–1911)
Events such as the
Mexican–American War, the
French Intervention and the
Reform War left the city relatively untouched and it continued to grow, especially during the rule of President
Porfirio Díaz. During this time the city developed a modern infrastructure, such as roads, schools, transportation systems and communication systems. However the regime concentrated resources and wealth into the city while the rest of the country languished in poverty.
Under the rule of Porfirio Díaz, Mexico City experienced a massive transformation. Díaz's goal was to create a city which could rival the great European cities. He and his government came to the conclusion that they would use Paris as a model, while still containing remnants of Amerindian and Hispanic elements. This style of Mexican-French fusion architecture became colloquially known as Porfirian Architecture. Porfirian architecture became very influenced by Paris'
During this era of Porfirian rule, the city underwent an extensive modernization. Many Spanish Colonial style buildings were destroyed, replaced by new much larger Porfirian institutions and many outlying rural zones were transformed into urban or industrialized districts with most having electrical, gas and sewage utilities by 1908. While the initial focus was on developing modern hospitals, schools, factories and massive public works, perhaps the most long-lasting effects of the Porfirian modernization were creation of the Colonia Roma area and the development of Reforma Avenue. Many of Mexico City's major attractions and landmarks were built during this era in this style.
Diaz's plans called for the entire city to eventually be modernized or rebuilt in the Porfirian/French style of the Colonia Roma; but the Mexican Revolution began soon afterward and the plans never came to fruition, with many projects being left half-completed. One of the best examples of this is the Monument to the Mexican Revolution. Originally the monument was to be the main dome of Diaz's new senate hall, but when the revolution erupted only the dome of the senate hall and its supporting pillars were completed, this was subsequently seen as a symbol by many Mexicans that the Porfirian era was over once and for all and as such, it was turned into a monument to victory over Diaz.
Mexican Revolution (1910–1920)
The capital escaped the worst of the violence of the ten-year conflict of the
Mexican Revolution. The most significant episode of this period for the city was the February 1913
la Decena Trágica ("The Ten Tragic Days"), when forces counter to the elected government of
Francisco I. Madero staged a successful coup. The center of the city was subjected to artillery attacks from the army stronghold of the ciudadela or citadel, with significant civilian casualties and the undermining of confidence in the Madero government.
Victoriano Huerta, chief general of the
Federal Army, saw a chance to take power, forcing Madero and Pino Suarez to sign resignations. The two were murdered later while on their way to
 Huerta's ouster in July 1914 saw the entry of the armies of
Pancho Villa and
Emiliano Zapata, but the city did not experience violence. Huerta had abandoned the capital and the conquering armies marched in.
Constitutionalist faction ultimately prevailed in the revolutionary civil war and Carranza took up residence in the presidential palace.
20th century to present
Frida Kahlo and Diego Rivera house in
, an example of 20th Century Modernist Architecture in Mexico
The rapid growth of the city during the 20th Century exploded in the development of both, illegal constructions and opulent residences in the periphery.
The history of the rest of the 20th century to the present focuses on the phenomenal growth of the city and its environmental and political consequences. In 1900, the population of Mexico City was about 500,000.
 The city began to grow rapidly westward in the early part of the 20th century
 and then began to grow upwards in the 1950s, with the
Torre Latinoamericana becoming the city's first skyscraper.
1968 Olympic Games brought about the construction of large sporting facilities.
In 1969 the
Metro system was inaugurated.
 Explosive growth in the population of the city started from the 1960s, with the population overflowing the boundaries of the Federal District into the neighboring State of Mexico, especially to the north, northwest and northeast. Between 1960 and 1980 the city's population more than doubled to nearly 9 million.
In 1980 half of all the industrial jobs in Mexico were located in Mexico City. Under relentless growth, the Mexico City government could barely keep up with services. Villagers from the countryside who continued to pour into the city to escape poverty only compounded the city's problems. With no housing available, they took over lands surrounding the city, creating huge
shantytowns that extended for many miles.
 This caused serious
air pollution in Mexico City and
water pollution problems, as well as
subsidence due to overextraction of groundwater.
 Air and water pollution has been contained and improved in several areas due to government programs, the renovation of vehicles and the modernization of public transportation.
The autocratic government that ruled Mexico City since the Revolution was tolerated, mostly because of the continued economic expansion since World War II. This was the case even though this government could not handle the population and pollution problems adequately. Nevertheless, discontent and protests began in the 1960s leading to the
massacre of an unknown number of protesting students in
Three years later, a demonstration in the Maestros avenue, organized by former members of the 1968 student movement, was violently repressed by a paramilitary group called "Los Halcones", composed of gang members and teenagers from many sports clubs who received training in the U.S.
On Thursday, September 19, 1985, at 7:19 am
CST, Mexico City was struck by an
earthquake of magnitude 8.1
 on the
Richter magnitude scale. Although this earthquake was not as deadly or destructive as many similar events in Asia and other parts of Latin America,
 it proved to be a disaster politically for the
one-party government. The government was paralyzed by its own bureaucracy and corruption, forcing ordinary citizens to create and direct their own rescue efforts and to reconstruct much of the housing that was lost as well.
However, the last straw may have been the controversial elections of 1988. That year, the presidency was set between the P.R.I.'s candidate, Carlos Salinas de Gortari, and a coalition of left-wing parties led by Cuauhtémoc Cárdenas, son of the former president Lázaro Cárdenas. The counting system "fell" because coincidentally the light went out and suddenly, when it returned, the winning candidate was Salinas, even though Cárdenas had the upper hand.
As a result of the fraudulent election, Cárdenas became a member of the
Party of the Democratic Revolution. Discontent over the election eventually led
Cuauhtémoc Cárdenas to become the first
elected mayor of Mexico City in 1997. Cárdenas promised a more
democratic government, and his party claimed some victories against crime, pollution, and other major problems. He resigned in 1999 to run for the presidency.