This study sheds light on the history of the Andalusian city of Barbastro and its role in the political events that took place in al-Thaghr al-Aʿlā (Upper March), since the Islamic conquest in 93 AH/712 AD. It demonstrated the importance of its geographical location in the far north of Andalusia, on the border with the Spanish Kingdom of Aragon, and the political and military events that took place on its land, in its villages and fortresses, which constituted a refuge for rebels and those who revolted against the state, from the end of the 2nd century AH/ 8th AD until the era of the Taifa Kings in the fifth century AH / eleventh AD. Then it dealt with the policy of the Spanish kingdoms towards the Kingdom of Zaragoza during the reign of Al-Muqtadir Billah Ahmed bin Hud, the papal crusade against Barbastro, and its control in 456AH/1064 AD, the catastrophe that befell its inhabitants, and then its liberation in the following year, until its final fall at the hands of Pedro I, King of the Kingdom of Aragon, and its exit from the Andalusian domain in 493 AH/1100 AD.