Guanajuato, city in central Mexico, capital of Guanajuato State, about 2010 m (about 6600 ft) above sea level. The city lies in a ravine surrounded by mountains rich with gold and silver mines that have been worked by Native Americans for more than 500 years. The city has several colonial buildings, the most important of which is the Alhóndiga de Granaditas, built as a public granary in 1798 and turned into a fortress by the Spanish. Guanajuato was founded in 1554 and was designated as a city in 1741. It was a center for the Mexican revolt for independence from Spain that began in 1810. Population (1995) 128,171.