The origins of The Kingdom of Aragon go back to the 11th Century, when the Aragonese counties, Sobrarbe and Ribagorza in the Central Pyrenees were controlled by The King of Pampalona, Sancho Garcés III “El Mayor”(The Elder). He owned an immense territory which extended from land in Zamora on the shore of the Pisuerga as far as the county of Pallás in Cataluña.
On his death in 1035 his Kingdom was shared out by testament to all his children, converting each county into a Kingdom. This way his son Ramiro inherited the county of Aragón, and his other son Gonzalo inherited Sobrarbe and Ribargorza.
This was the birth of the future Kingdom of Aragón, because Gonzalo was killed soon after and all the land he owned went to his brother Ramiro.
Ramiro I (1035-1064) was the first King of Aragón. He strengthened the defense of his properties, which doubled in extension in less than three decades, advancing towards the South and the East. By doing so he recaptured land from the Muslims and impeded the excessive expansion of the Catalan territory. In fact he lost his life in one of these battles.
After his death, his son Sancho Ramírez (1064 – 1094) inherited the Kingdom. His military exploits followed those of his father, although he advanced further politically. He realized that the best thing for his Kingdom would be modernization and to become more European. So, not only did he pledge loyalty to the Vatican in Rome, but he also brought about the Gregorian and Cluniacense reform, and installed the Roman faith to the detriment of that of the Mozarabics.
He gained possession of more land, because when his cousin The King of Pamplona died, he inherited that Kingdom. This was why Jaca became the capital. Also he tried to recapture cities like Barbastro, Tudela or Huesca. In fact , in 1094 he died at the foot of the wall of Huesca.
It was his son, King Pedro I (1094 –1104) who finally conquered the capital of Oscense after the Battle of Alcoraz, turning Huesca into the new capital. The reign of Pedro I only lasted 10 years. He died without leaving any descendants, which meant the Kingdom was inherited by his brother Alfonso I (1104- 1134), whose nickname “El Batallador”( The Warrior) alludes to his conquests, because he captured more than 25,000 square kilometres from the Muslims, including the city of Zaragoza.
He was the one who realized how important it was to find a way out to sea for the Kingdom, and for that reason he set out down the river Ebro with his armies.
Nevertheless, he did not reach his destination as he died leading his troops through the city of Fraga. Just like his predecessor he died childless, and according to his testament he left the Kingdom to the Military Order of the Temple, San Juan del Hospital and The Holy Grave. However, his last wish was not carried out, because the Aragon Assembly opposed it, and handed over the throne to another of the Ramirez brothers, the future King Ramiro II “El Monje”(The Monk).