It was built in the 16th century after the arrival of a foreign-born king, Carlos I of Spain or Karl V of Germany (whose coat of arms is emblazoned above the fountain). The king was a champion of the new philosophy that was sweeping through Europe - the Renaissance.
During the Renaissance, citizens began to organise themselves and demand public services from the king and the authorities, including water supply, paved streets, hospitals and safe roads. This fountain is proof of this.
It was a move away from the idea of Muslim-style cities with narrow streets to shield oneself from the sun. Small squares like this one were built as a meeting place for citizens and the provision of public services, such as water. The squares were also used for festivals that in the medieval period had been held inside castles and palaces.
The king and the city council engraved their coats of arms on the fountain to make it clear that they built the fountain.
Above the coat of arms of Alanis (two Alano dogs on either side of the castle) is an 18th-century tile with the image of town’s patron saint, Our Lady of Anguish, protected with a grille.