The city of Loja was founded by Field Marshal Alonso de Mercadillo in 1548, and it is named for his hometown of Loja in Spain. Originally located near La Toma in the Catamayo canyon, the city was relocated to its present location (about 35 km east) after a devastating earthquake. At nearly 500 years, it is one of the oldest cities in Ecuador. The city was also visited by Simon Bolívar in his campaign to unite Gran Colombia.
Loja was a departure point for the Amazon Basin and the El Dorado region for Spanish Conquistadors. It declared its independence from Spain on November 18, 1820.
The city of Loja has the distinction of being the first city in Ecuador to be wired for electric power provided by a hydroelectric dam that was completed in the 1890s