The Spanish founded the first León in 1524, about 30 km east of today's city, on the shore of Lake Xolotlán under the Momotombo volcano. It never thrived: there were too few Indigenous people nearby for the colonists to exploit, and by 1606 only ten Spanish families were left. A destructive earthquake in 1610 ended it. You can walk the old street plan today at León Viejo, a UNESCO World Heritage site.
After the earthquake, the city was moved next to Sutiava, a thriving Indigenous town, over the objections of its people. Almost everything went with it, down to the church statues and the bones from the cemeteries. That is why León has two centres 14 blocks apart, one colonial and one Indigenous, each with its own traditions.
The Church shaped the new León. A seminary opened in 1680 to train priests, and in 1812 the city founded a university, the second oldest in Central America. The cathedral went up between 1747 and 1814.
León was the capital from colonial times and stayed so when Nicaragua broke away from the Central American federation in 1839. Liberal governments favoured León and conservative ones favoured Granada, and the rivalry led to civil war in the 1850s. Managua became the permanent capital in 1852 as a compromise, which is why neither city holds the title.
In the 20th century León was a centre of resistance to the Somoza family dictatorship. In 1956 the young poet Rigoberto López Pérez shot the dictator Anastasio Somoza García at the Casa del Obrero and was himself killed in a hail of bullets. In 1979 the Sandinistas took the city after street fighting, and the next Somoza ordered it bombed. The ruined San Sebastián church and bullet marks on some buildings are what remains.
From the 1950s to the 1970s cotton was the main crop, then it declined and sugarcane and peanuts took over. In April 2018, protests in León against social security changes were repressed, and they spread across the country. Many people died, the economy has been weak since, and tourism took a big hit. León still draws backpackers.