 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.