Around 613 an Irishmonk named Gallus, a disciple and companion of Saint Columbanus, established a hermitage on the site that would become the monastery. He lived in his cell until his death in 646[2] in Arbon.[3] The people kept looking for protection at Gallus' cell in time of danger.[3]

Following Gallus' death, Charles Martel appointed Otmar as custodian of St Gall's relics. Several different dates are given for the foundation of the monastery, including 719,[3] 720,[4] 747[5] and the middle of the 8th century.[6] During the reign of Pepin the Short, in the 8th century, Othmar founded the Carolingian style Abbey of St Gall, where arts, letters and sciences flourished. The abbey grew fast and many Alemannic noblemen became monks. At the end of abbot Otmar's reign, the Professbuch mentions 53 names. Two monks of the Abbey of St Gall, Magnus von Füssen and Theodor, founded the monasteries in Kempten and Füssen in the Allgäu. With the increase in the number of monks the abbey grew stronger also economically. Much land in Thurgau, Zürichgau and in the rest of Alemannia as far as the Neckar was transferred to the abbey due to Stiftungen.[3] Under abbot Waldo of Reichenau (740–814) copying of manuscripts was undertaken and a famous library was gathered. Numerous Anglo-Saxon and Irish monks came to copy manuscripts. At Charlemagne's request Pope Adrian I sent distinguished chanters from Rome, who propagated the use of the Gregorian chant. In 744, the Alemannic nobleman Beata sells several properties to the abbey in order to finance his journey to Rome.[7]

In the subsequent century, St Gall came into conflict with the nearby Bishopric of Constance which had recently acquired jurisdiction over the Abbey of Reichenau on Lake Constance. It was not until EmperorLouis the Pious (ruled 814–840) confirmed in 813 the imperial immediacy (Reichsunmittelbarkeit) of the abbey, that this conflict ceased.[2] The abbey became an Imperial Abbey (Reichsabtei). King Louis the German confirmed in 833 the immunity of the abbey and allowed the monks the free choice of their abbot.[7] In 854 finally, the Abbey of St Gall reached its full autonomy by King Louis the German releasing the abbey from the obligation to pay tithes to the Bishop of Constance.

From this time until the 10th century, the abbey flourished. It was home to several famous scholars, including Notker of Liège, Notker the Stammerer, Notker Labeo and Hartker (who developed the antiphonalliturgical books for the abbey). During the 9th century a new, larger church was built and the library was expanded. Manuscripts on a wide variety of topics were purchased by the abbey and copies were made. Over 400 manuscripts from this time have survived and are still in the library today.[2]

Between 924 and 933 the Magyars threatened the abbey and the books had to be removed to Reichenau for safety. Not all the books were returned.

On 26 April 937 a scholar kindled a fire and the abbey and the adjoining settlement were almost completely destroyed; the library was undamaged, however.[7] About 954 they started to protect the monastery and buildings by a sourrounding wall.[8] Around 971/974 abbot Notker finalized the walling and the adjoining settlements started to become the town of St Gall.[7]

The death of abbot Ulrich on 9 December 1076 terminates the cultural silver age of the monastery.[7]

The territories of the Abbey of St. Gall from the mid-15th century to 1798

In the 13th century, the town became an independent principality, over which the abbots previously ruled as territorial sovereigns ranking as Princes of the Holy Roman Empire. As the abbey became more involved in local politics, it entered a period of decline.[2] During the 14th century Humanists[2] were allowed to carry off some of the rare texts.

In the late 14th and early 15th centuries, the farmers of the abbot's personal estates (known as Appenzell, from Latin: abbatis cella meaning "cell (i.e. estate) of the abbot) began seeking independence. In 1401, the first of the Appenzell Wars broke out, and following the Appenzell victory at Stoss in 1405 they became allies of the Swiss Confederation in 1411. During the Appenzell Wars, the town of St. Gallen often sided with Appenzell against the abbey. So when Appenzell allied with the Swiss, the town of St. Gallen followed just a few months later.[8] The abbot became an ally of several members of the Swiss Confederation (Zürich, Lucerne, Schwyz and Glarus) in 1451. While Appenzell and St. Gallen became full members of the Swiss Confederation in 1454. Then, in 1457 the town of St. Gallen became officially free from the abbot.[8]

In 1468 the abbot, Ulrich Rösch, bought the county of Toggenburg from the representatives of its counts, after the family died out in 1436. In 1487 he built a monastery at Rorschach on Lake Constance, to which he planned to move. However, he encountered stiff resistance from the St. Gallen citizenry, other clerics, and the Appenzell nobility in the Rhine Valley who were concerned about their holdings. The town of St. Gallen wanted to restrict the increase of power in the abbey and simultaneously increase the power of the town. The mayor of St. Gallen, Ulrich Varnbüler, established contact with farmers and Appenzell residents (led by the fanatical Hermann Schwendiner) who were seeking an opportunity to weaken the abbot. Initially, he protested to the abbot and the representatives of the four sponsoring Confederate cantons (Zürich, Lucerne, Schwyz, and Glarus) against the construction of the new abbey in Rorschach. Then on July 28, 1489 he had armed troops from St. Gallen and Appenzell destroy the buildings already under construction.[8] When the abbot complained to the Confederates about the damages and demanded full compensation, Varnbüler responded with a counter suit and in cooperation with Schwendiner rejected the arbitration efforts of the non-partisan Confederates. He motivated the clerics from Wil to Rorschach to discard their loyalty to the abbey and spoke against the abbey at the town meeting at Waldkirch, where the popular league was formed. He was confident that the four sponsoring cantons would not intervene with force, due to the prevailing tensions between the Confederation and the Swabian League. He was strengthened in his resolve by the fact that the people of St. Gallen elected him again to the highest magistrate in 1490.

However, in early 1490 the four cantons decided to carry out their duty to the abbey and to invade the St. Gallen canton with an armed force. The people of Appenzell and the local clerics submitted to this force without noteworthy resistance, while the city of St. Gallen braced for a fight to the finish. However, when they learned that their compatriots had given up the fight, they lost confidence; the end result was that they concluded a peace pact that greatly restricted the city's powers and burdened the city with serious penalties and reparations payments. Varnbüler and Schwendiner fled to the court of King Maximilian and lost all their property in St. Gallen and Appenzell. However, the abbot's reliance on the Swiss to support him reduced his position almost to that of a "subject district"[8]

The town adopted the Reformation in 1524, while the abbey remained Catholic, which damaged relations between the town and abbey. Both the abbot and a representative of the town were admitted to the Swiss Tagsatzung or Diet as the closest associates of the Confederation.[8]

In the 16th century the abbey was raided by Calvinist groups, which scattered many of the old books.[2] In 1530, abbot Diethelm began a restoration that stopped the decline and led to an expansion of the schools and library.

The interior of the Cathedral is one of the most important baroque monuments in Switzerland

Under abbot Pius (1630–74) a printing press was started. In 1712 during the Toggenburg war, also called the second war of Villmergen, the Abbey of St. Gall was pillaged by the Swiss. They took most of the books and manuscripts to Zürich and Bern. For security, the abbey was forced to request the protection of the townspeople of St. Gallen. Until 1457 the townspeople had been serfs of the abbey, but they had grown in power until they were protecting the abbey.

Following the disturbances, the abbey was still the largest religious city-state in Switzerland, with over 77,000 inhabitants.[9] A final attempt to expand the abbey resulted in the demolition of most of the medieval monastery. The new structures, including the cathedral, were designed in the late Baroque style and constructed between 1755 and 1768. The large and ornate new abbey did not remain a monastery for very long. In 1798 the Prince-Abbot's secular power was suppressed, and the abbey was secularized. The monks were driven out and moved into other abbeys. The abbey became a separate See in 1846, with the abbey church as its cathedral and a portion of the monastic buildings for the bishop.

The Abbey library of Saint Gall is recognized as one of the richest medieval libraries in the world. It is home to one of the most comprehensive collections of early medieval books in the German-speaking part of Europe. As of 2005[update], the library consists of over 160,000 books, of which 2100 are handwritten. Nearly half of the handwritten books are from the Middle Ages and 400 are over 1000 years old.[1] Lately the Stiftsbibliothek has launched a project for the digitisation of the priceless manuscript collection, which currently (December 2009) contains 355[1] documents that are available on the Codices Electronici Sangallenses webpage.

The library interior is exquisitely realised in the Rococo style with carved polished wood, stucco and paint used to achieve its overall effect. It was designed by the architect Peter Thumb and is open to the public. In addition it holds exhibitions as well as concerts and other events.[10]

The library also preserves a unique 9th-century document, known as the Plan of St. Gall, the only surviving major architectural drawing from the roughly 700-year period between the fall of the Roman Empire and the 13th century. The Plan drawn was never actually built, and was so named because it was kept at the famous medieval monastery library, where it remains to this day. The plan was an ideal of what a well-designed and well-supplied monastery should have, as envisioned by one of the synods held at Aachen for the reform of monasticism in the Frankish empire during the early years of emperor Louis the Pious (between 814 and 817).

A late 9th-century drawing of St. Paul lecturing an agitated crowd of Jews and gentiles, part of a copy of a Pauline epistles produced at and still held by the monastery, was included in a medieval-drawing show at the Metropolitan Museum of Art in New York the summer of 2009. A reviewer noted that the artist had "a special talent for depicting hair, ... with the saint's beard ending in curling droplets of ink."[11]

St Gall is noted as an early user of neume, the basic element of Western and Eastern systems of musical notation prior to the invention of five-line staff notation. The earliest extant manuscripts are from the 9th or 10th century.