The episcopal seat was established in Jaca during 1063-1096, then finally moved back to Huesca after king Pedro I of Aragon took the city from the Moors in November 1096.
The date of origin of the diocese cannot be definitely ascertained; the earliest evidence of its existence is the signature of Gabinius, Bishop of Huesca, to the decrees of the Third Council of Toledo, held in 589.
Isidore of Seville, writing in the 7th century,[1] mentions the presence of Elpidius, Bishop of Huesca, at an earlier council, but this is not considered authoritative.
[2] A synod held in the diocese in 598 ordered annual diocesan conferences and enacted various disciplinary measures.
In the same year of 1063, however, King Sancho Ramirez of Aragon (1063-1094) had won back from the Moors the city of Barbastro, and had granted it to the Bishop of Roda.
In November 1096, King Pedro I of Aragon took back Huesca from the Moors and restored the original see.
After the failure of his plans at Perpignan, king Pedro IV of Aragon in 1354 established a university at Huesca, which was maintained by a tax laid on the city's food, and which pursued a steady if not a brilliant existence until it was eclipsed by the great college at Saragossa.
The Concordat of 1851 formally annexed Barbastro once more to Huesca, but preserving its name and administration, being administered by a vicar Apostolic.