Barbastro (Latin: Barbastrum or Civitas Barbastrensis, Aragonese: Balbastro) is a city in the Somontano county, province of Huesca, Spain.
Barbastro and the Barbitaniya area were overtaken by Musa bin Nusair in 717, as part of the Umayyad push to conquer northern states of the Marca Hispanica and the name Madyar was given to the town.
In 1064, Sancho Ramírez, King of Aragón, and his Frankish Christian forces, led by William VIII of Aquitaine and Le Bon Normand, invaded the city, which at the time was part of the emirate of Zaragoza.
Contemporary sources state that 50,000 people were killed or captured in the attack, but modern historians view this as an exaggeration since the whole population of the town probably did not exceed 8,000.
Barbastro's economy flourished until the early 20th century, when a period of decline began, ending only in the 1960s due to the growth of agricultural production.