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. Silver Age 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 fire broke out and destroyed much of the abbey and the adjoining settlement, though the library was undamaged. About 954 they started to protect the monastery and buildings by a surrounding wall. Around 971/974 abbot Notker (about whom almost nothing is known; nephew of Notker Physicus) finalized the walling and the adjoining settlements started to become the town of St Gall. In 1006, the abbey was the northernmost place where a sighting of the 1006 supernova was recorded. The death of abbot Ulrich II on 9 December 1076 terminated the cultural silver age of the monastery. Under the Prince-Abbots In 1207, abbot Ulrich von Sax becomes a Prince (Reichsfürst, or simply Fürst) of the Holy Roman Empire by King Philip of Germany. The abbey became a Princely Abbey (Reichsabtei). As the abbey became more involved in local politics, it entered a period of decline. The city of St. Gallen proper progressively freed itself from the rule of the abbot, acquiring Imperial immediacy, and by the late 15th century was recognized as a Free imperial city. By about 1353 the guilds, headed by the cloth-weavers guild, gained control of the civic government. In 1415 the city bought its liberty from the German king King Sigismund. During the 14th century Humanists were allowed to carry off some of the rare texts from the abbey library. In the late 14th and early 15th centuries, the farmers of the abbot's personal estates (known as Appenzell, from 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. The abbot became an ally of several members of the Swiss Confederation (Zürich, Lucerne,