Alfonso VII was the son of Count Ramón of Burgundy and Doña Urraca, the daugther of Alfonso VI, who sent the couple to repopulate Avila, which was very damaged due to the continuous conflicts between the Moors and the Christians.

When the Count passed away, his son took the throne at the tender age of four, and Doña Urraca remarried, this time wedding Alfonso I of Aragon, also known as "El Batallador",who mistreated his wife until their separation. Alfonso I of Aragon's true ambition was to take the throne from his stepson, who he took to the hill of Hervero in Avila, the place of Las Hervencias. He was going to overtake the CHILD KING, or REY NIÑO, but the knights of Avila, loyal to the Castillian king, refused to hand him over. Instead, they merely showed him to Alfonso I, propping the child between two battlements of the apse of the cathedral, a scene which gave rise to the coat of arms of Avila.

The Aragonese king, enraged by the loyalty of the people of Avila, ordered for the heads of seventy captured knights to be cut off and boiled in oil. These knights crossed the 'Door of Misfortune' (Puerta de la Mala Ventura), to meet their fate which the "Batallador" had handed down. It is for this story that the city of Avila earned the titles of:
Avila of the King
Avila of the Knights
Avila of the Loyal