The first known inhabitants of the area were the Otomi, who were then displaced by the Chichimeca. There was Purépecha presence as well due mostly to ancient trading routes. The oldest known name for the area is “Mo-o-ti,” which means “place of metals.” Later, it was called "Paxtitlán" by the Aztecs, which means “place of straw.” The current name of Guanajuato comes from Purépecha “Quanax huato," which means “hilly place of frogs”.
Mining had been done in this area long before the Spanish arrived. Late in the pre-Hispanic period the Aztecs had a presence here, specifically to look for metals to make ornamental objects for their political and religious elite. Some stories from this time state that the area was so rich in minerals that nuggets of gold could be picked up from the ground.
Interior of the Basilica Colegiata de Nuestra Señora de Guanajuato
The Spanish found deposits of gold here in the 1540s and soon they sent soldiers and built forts. In 1548, the outpost formally established with the name of Real de Minas de Guanajuato by viceroy Don Antonio de Mendoza. Despite Chichimeca attacks, the population of the area grew rapidly with the arrival of Spanish and Creole migrants and indigenous and mestizo traders and workers. It was soon declared a town with the name of Santa Fe Real de Minas de Guanajuato and Preafán de Rivera as mayor. Its first church was consecrated in 1555, and it was named a “alcadía mayor” in 1574.
Initially, the city was divided into four barrios or neighborhoods called Marfil/Santiago, Tepetapa, Santa Ana and Santa Fe. The last is considered the oldest and is in the current colonia of Pastita. This city was split by a small river that served as a main thoroughfare. The oldest neighborhoods are Rayas y Mellado, Cata, La Valenciana, and Pastita, named after the mines found there.
Mexico's Spanish colonial past is well evidenced in Guanajuato's splendid architecture.
The very first mineral vein discovered, called San Bernabé, attracted attention not only in New Spain, but in Spain itself. The discovery brought thousands of migrants to the area, which led to the discovery of other deposits, such as at the Rayas mine. The San Bernabé find produced until 1928, when it tapped out. Today, the remains of this mine is found in the small village of La Luz, just outside the city proper.
In 1679, by decree of viceroy of Mexico Fray Payo Enriquez de Rivera, the name was changed to Ciudad de Santa Fe y Real de Minas de Guanajuato (Very Noble and Loyal City of Santa Fe y Real de Minas de Guanajuato). It received an escutcheon in the same year, which is still in use. The city's coat of arms of a gold background with an image of a woman in the center referring to the Holy Faith (Santa Fe). It contains other images such as a seashell supported by two laurel branches, blue ribbon and marble columns. It is topped with the royal crown of Castille and acanthus leaves.
In 1741, the city received the title of “The Most Noble and Loyal City of Santa Fe de Minas de Guanajuato” and became an “intendencia” (province) in 1790 because of the abundance of riches coming from its mines. In the 18th century, it was the world's leading silver extraction center, making it the richest city in Mexico for much of the early colonial period. The production of the La Valenciana mine alone affected the world economy, and made the counts of Valencianas one of the most powerful families in New Spain. The city was one of the richest and most opulent in New Spain in the 18th century. This wealth is manifested in its civil and religious architecture. The colonial architecture includes some of the best Baroque and Churrigueresque examples in the New World—such as the Valenciana, Cata, and La Compañia (Jesuit) Churches, and the Basilica of Our Lady of Guanajuato. Most constructions from this time are of pink or green sandstone. In the churches, the Baroque altars were gilded with gold from local mines. These structures have influenced later buildings throughout central Mexico. According to the UNESCO World Heritage Sites, the La Compañia and La Valenciana churches are considered among the most beautiful examples of Baroque architecture in Central and South America.
By the end of the 18th century, the lower classes were poor and oppressed despite the great wealth coming out of the mines. One event foreshadowing the Mexican War of Independence was a revolt carried out in the city attacking the heavily militarized Caja Real (building to hold the Crown's share of mining production) to protest the high taxes. One year later there were large protests against the expulsion of the Jesuits.
The War of Independence broke out in the state of Guanajuato in the town of Dolores, when Father Miguel Hidalgo y Costilla shouted the “Grito de Dolores” and raised an insurgent army on September 15 and 16, 1810. This army marched to San Miguel, today San Miguel de Allende, and then onto the city of Guanajuato. Just on the outskirts on September 28, 1810, Hidalgo sent a warning letter to city authorities, but it was ignored. Instead, royalist troops and many of the elite made their stand at the Alhóndiga de Granaditas granary, an imposing building with few windows and thick walls. After entering the city unopposed, Hidalgo decided to attack the granary. This was the first battle against Spanish troops in the war and is popularly called the 'Siege of the Alhondiga'. The insurgents were unable to take the heavily defended building as royalist gunfire kept them from approaching the only entrance until a miner by the name of Juan José de los Reyes Martínez, better known as El Pípila, brilliantly strapped a large flat stone onto his back for protection. Crawling, he carried a flask of tar and a torch. When he reached the wooden doors of the main entrance, he smeared it with the tar and set it on fire. This allowed the insurgents to penetrate the building, defeat the Spanish royalist army and elite, and take over the heavily fortified and defended building. This action is commemorated by a colossal statue of Pipila on a hill overlooking the city.
After Independence, the province of Guanajuato was made a state, and the city was made its capital in 1824. However, fighting in the state and the rest of the country continued as Liberals, who wanted a Federalist government, fought with Conservatives, who wanted a centralized government under a monarch or dictator. Power in the city and state changed hands between the two factions during much of the 19th century, taking its toll on mining. The city was the provisional capital of the country in 1858 as Liberal president Benito Juárez fought Conservative rebels. In 1863, the French took the city during the French Intervention in Mexico, receiving a visit from the installed Emperor Maximiliano I and his wife, Carlota. French occupation ended in 1868, when the newly assimilated Mexican General Florencio Antillón captured it on January 26.
Mining reactivated around the 1870s due to foreign investments encouraged by the Porfirio Díaz government. During the late 19th and early 20th centuries this renewed economic activity spurred new era Mexican projects such as the Juárez Theater, the Esperanza Dam, the Monumento a la Paz, the Hidalgo Monument and the State Government Palace.
Flooding had been a serious problem through most of the city's history, due to the area's steep compact hillsides. In 1760 and 1780 two major floods nearly wiped it out. This spurred construction of large ditches and tunnels to contain and divert overflows during the rainy season. These eventually crisscrossed a large part of the city. Dam construction in the 1960s brought the flooding under control, and many of the ditches and tunnels were converted into underground roadways.
The first Festival Internacional Cervantino was held in 1972. The historic city center was declared a World Heritage Site in 1988.