Long before the Spanish Conquest, the Sabana de Bogotá, a fertile highland basin which today has been almost entirely taken over by the city, was inhabited by one of the most advanced pre-Columbian Indian groups, the Muisca. The Spanish era began when Gonzalo Jiménez de Quesada and his expedition arrived at the Sabana, founding the town on August 6, 1538 near the Muisca capital, Bacatá.
The town was named Santa Fe de Bogotá, a combination of the traditional name and Quesada's hometown in Spain, Santa Fe. Nonetheless, throughout the colonial period the town was simply referred to as Santa Fe.
At the time of its foundation Santa Fe consisted of 12 huts and a chapel where a mass was held to celebrate the town's birth. The Muisca religious sites were destroyed and replaced by churches.
During the early years Santa Fe was governed from Santo Domingo (on the island of Hispaniola, the present-day Dominican Republic), but in 1550 it fell under the rule of Lima, the capital of the Viceroyalty of Peru and the seat of Spain's power for the conquered territories of South America. In 1717 Santa Fe was made the capital of the Virreynato de la Nueva Granada, the newly created viceroyalty comprising the territories of present-day Colombia, Panama, Venezuela and Ecuador.
Despite the town's political importance, its development was hindered by both the earthquakes, and smallpox and typhoid epidemics that plagued the region throughout the 17th and 18th centuries.
After independence the Congress of Cúcuta shortened the town's name to Bogotá and decreed it the capital of Gran Colombia. The town developed steadily and by the middle of the 19th century it had 30, 000 inhabitants and 30 churches. In 1884 the first tramway began to operate in the city and, soon after, railway lines were constructed to La Dorada and Girardot, giving Bogotá access to the ports on the Río Magdalena.
Rapid progress came only in the 1940s with industrialization and the consequent peasant migrations from the countryside. On April 9, 1948, the popular leader Jorge Eliécer Gaitán was assassinated, sparking the uprising known as El Bogotazo. The city was partially destroyed; 136 buildings were burnt to the ground and 2500 people died.
Tranquil life in Bogotá was rocked again on November 6, 1985 when guerrillas of the M-19 Revolutionary Movement invaded the Palace of Justice in Bogotá and made hostages of the 300-plus civilians in the building. By the next day, 115 people were dead, including 11 supreme court justices.
In recent decades the city has continued to expand rapidly to become a vast metropolis.