The Monastery of Santa Maria de Ripoll is a Benedictine monastery, built in the Romanesque style, located in the town of Ripoll in Catalonia, Spain. Although much of the present church is 19th century rebuilding, the sculptured portico is a renowned work of Romanesque art. History The Monastery of Santa Maria de Ripoll was founded in 888 by Count Wilfred the Hairy (called Guifré el Pilós in Catalan) who used it as a centre to bring about the repopulation of the region after conquering it. Wilfred's son, Ridulph, was educated there and was later abbot of the monastery, as well as bishop of Urgell. The monastery grew rapidly, and was subsequently reconsecrated in 935, 977 and 1032, though the monks are known to have been established there permanently only from 1025 or 1032. The scriptorium and the monastic school quickly gained renown under Arnold Scholasticus. The monastery had several offshoots which included the abbeys of St. Martin-du-Canigou (now in France) and that of Santa Maria de Montserrat. It was also known for its collection of manuscripts which numbered 246 by the year 1046, and later included the 13th century Gesta comitum Barcinonensium, considered to be the first history of Catalonia and written by the monks themselves. From 1070 to 1169 the monastery was governed by the Abbey of St. Victor of Marseille. Santa Maria de Ripoll was the main religious center of Catalonia until the 15th century, when it started to decline, beginning with the loss of control over the Monastery of Montserrat in 1402. In 1428 it was severely damaged by an earthquake, after which it was restored with the new parts in Gothic style. The monastery became the family mausoleum for the Counts of Barcelona and Counts of Besalú, and well as a great center of learning, with a large library. The library and much of the monastery's vast archives were destroyed by fire in 1835, after it had been secularized. In 1847 part of the cloister was demolished, followed in 1856 by the abbey palace. It was rebuilt in 1886, under the direction of architect Elias Rogent, the basilica being consecrated in 1896. Architecture The original monastic church had a nave and four aisles, roofed by barrel vaults. The nave and aisle terminated in five apses, later increased to seven when apses were added to the transepts also. The current church dates to Rogent's reconstruction in 1896,