THE CHRISTIAN REALMS 259
of control over the affairs of the other counts, and on occasion con-
ducted trials and hearings in their territories, as well as signing or
confirming charters from areas outside their immediate jurisdiction.
The comital dynasty had strong ties to the Church, and on occa-
sion members of the family held ecclesiastical office, as for example
did Miro Bonfil (d. 984), who was simultaneously Count of Besalu
and Bishop of Gerona. His nephew Oliba inherited the tiny county
of Bergueda in 990, which he surrendered to his brothers in 1003 to
enter the monastery of Ripoll, founded by his ancestor Wifred I in
- In 1005 he was elected its abbot, and also that of the monastery
of Cuxa, across the Pyrenees, and in 1018 he was in addition conse-
crated Bishop of Vich.
Such close involvement with the secular rulers of the region brought
enormous benefit to the Church in Catalonia, contrary to the tenor
of the arguments of the eleventh-century ecclesiastical reformers. The
comital house, from the time of Wifred I onwards, was the foremost
patron of monasticism in the area. As well as for actual foundations
of such important monasteries as Ripoll, San Juan de las Abadesses
and San Pedro de Roda, the counts were responsible for an almost
unbroken series of donations to most of the major houses. They were
also active patrons and defenders of learning and reform. The monk
Gerbert of Aurillac, later Pope Sylvester II (999-1003), came to
Catalonia to study under Bishops Atto of Vich and Miro Bonfil of
Gerona. Under Oliba, Ripoll and Cuxa became major centres of
learning, all the more remarkable when contrasted with other such
institutions in most parts of Christian Spain and western Europe.
Manuscripts, especially of mathematical and scientific interest, were
available there, probably obtained from Cordoba, and a number of
poems have survived that were composed by monks under Oliba's
rule as well as some by himself. At the same time the library at Ripoll,
in which small beginnings had been made in earlier decades, under-
went a substantial expansion, and its collection continued to grow in
subsequent centuries. 59 Much of it was still in existence when the
monastery was sacked by the local populace in 1835 when the Span-
ish religious houses were secularised.
Although Cordoba was probably the source of much of the learn-
ing that flourished in Catalonia in the late tenth and early eleventh
centuries, and this is further testimony of the interdependence of
the different regions of the peninsula in many varying ways, some
borrowings were also made from France. The monasteries of the