At midday, Aymerich ordered the retreat. The Royalist army, now disorganized and exhausted, retreated down the slopes of Pichincha towards Quito. Although some units descended to Quito in disarray, harassed by the "Magdalena" battalion charging after them, others retreated in orderly fashion. The Colombians reached the outer limits of Quito, but did not go any further, acting on orders from their commanding officer who prudently decided against letting his soldiers enter the city. Thus, the Battle of Pichincha had ended. From the moment of first contact to the order of retreat, it had lasted no more than three hours.