Ramiro I of Aragon Ramiro I ( bef . 1007 – 8 May 1063 ) was " de facto " the first King of Aragon from 1035 until his death . Apparently born before 1007 , he was the illegitimate son of Sancho III of Navarre by his mistress Sancha de Aybar . Ramiro was reputed to have been adopted by his father ' s wife Mayor after he was the only of his father ' s children to come to her aid when needed , although there is no surviving record of these events and the story is probably apocryphal . During his father ' s reign , he appeared as witness of royal charters starting in 1011 , and was given numerous properties in the county of Aragon , and by the division of Sancho ' s realm on the latter ' s death in 1035 , the county of Aragon fell to Ramiro with the title of " baiulus " or steward . This was part of what would prove to be a larger division : Navarre and the Basque country went to eldest half - brother García , the county of Castile , already held by Ferdinand , reverted to its feudal fealty to the Kingdom of León , while the counties of Sobrarbe and Ribagorza fell to Gonzalo and Ramiro received lands in Aragon to hold under García . Ramiro ' s exact status is vague . He was called king by his vassals , neighbors , the church and even his sons , yet he always referred to himself simply as " Ranimiro Sancioni regis filio " ( Ramiro , son of King Sancho ) . Likewise , in his two wills , he refers to his lands as having been given him in stewardship : in the first by García , and in the second by God . He is called " regulus " ( rather than " rex " used for García ) and " quasi pro rege " ( acting as if king ) in charters from Navarre . Due to his growing independence and the small size of his Pyrenean holdings , he is sometimes called a " petty king " , Aragon a " pocket kingdom " . Ramiro sought to enlarge his lands at the expense of both the Moors and his brother , García , the King of Navarre . Shortly after the death of his father ( the date variously placed from 1036 to 1043 ) , he supported the emir of Tudela in an invasion of the Navarre . While he was defeated in the Battle of Tafalla , he still was able to gain territory , including Sanguesa , and established a state of semi - autonomy . In 1043 , apparently with the approval of García , he annexed Sobrarbe and Ribagorza , previously held by his youngest legitimate half - brother , Gonzalo . This union created a pseudo - independent Aragonese state , with its capital at Jaca , that would give rise to the Kingdom of Aragon . Before he was married , Ramiro had a mistress named Amuña with whom he had a natural son , Sancho Ramírez , in whom he confided the government of the county of Ribagorza . Ramiro wed his first wife , Gisberga , daughter of Bernard Roger of Bigorre , on 22 August 1036 . She changed her name to Ermesinda on marrying him . Together the couple had five children : Sancho Ramírez , his successor ; García , Bishop of Jaca ; Sancha , married Armengol III of Urgel ; Urraca , nun in Santa Cruz de la Serós ; and Theresa , married William Bertrand of Provence . Ramiro ' s second wife was Agnes ( Inés ) , was perhaps a daughter of the Duke of Aquitaine . After annexation of Ribagorza and Sobrarbe , Ramiro began the advance from Aragon toward Huesca and Zaragossa . The first charter for the royal town of Jaca is attributed to him . It included well defined laws of protection even to non residents , and would set an example for urban rights until late in the Middle Ages . Ramiro died at the Battle of Graus in 1063 while trying to take the city .