source for the abbey's history), Liber viventium (the abbey's memorial book) and Vidimus Heider (the abbey's cartulary). In 1208, Otto IV, Holy Roman Emperor, passed Vogtei (protectorship) of the monastery to the Barony of Sax, to whom the monks pledged at least partial allegiance. In 1257, Abbot Rudolf bought back their freedom for 300 silver marks and, in 1261, transferred it to the of Freudenberg Castle. In the 14th century there were two separate Vogtei over the monastery and the upper Taminatal: Castle Freudenberg and Ragaz. Later, the protectorship passed to the counts of Werdenberg-Sargans and Werdenberg-Heiligenberg. In 1397, the monastery again bought back their Vogtei and, in 1408, King Rupert granted the monastery the privilege to choose its own protector. Following the acquisition of the county of Sargans as a Gemeine Herrschaft of the Old Swiss Confederacy, the abbey became a Swiss protectorate in condominium between Sargans and the Acht Orte of the Confederacy minus Berne. The monastery was caught in the turmoil of the Swabian War and the Protestant Reformation and the general financial and political difficulties that engulfed the region. Abbot John Heider (1586–1600) managed briefly to restore the original position of the monastery, but under his successors the situation worsened so the Swiss Confederacy took over administration of the monastery. 17th century In 1665 a fire destroyed the medieval monastery and church. In 1672, Abbot Justus Zink presented plans by John Serro and Giuglio Barbieri for rebuilding the abbey, in the Baroque style, closer to the mountain slope, in the present dominant position, with the first rooms ready for occupation in 1674. Because of the disastrous financial situation, Abbot Zink was forced to resign in 1676, passing control to the Swiss Congregation of the Benedictine Confederation. His successor, Abbot Boniface I Tschupp, managed the financial recovery and completed the construction in 1694, with the new abbey church dedicated in the same year. 18th century The election of the abbot caused controversy in 1734 as Zürich—one of the Swiss cantons in condominium over the abbey—refused to confirm the election of abbot Ambrosius Müller; Johann Jakob Scheuchzer was therefore commissioned to examine the royal privileges of the abbey. Some of the Imperial and Papal papers confirming rights of the monastery were identified as 17th-century forgeries. Negotiations at the 1738 Tagsatzung finally confirmed the rights of the abbey over the municipalities of Pfäfers, Vättis, Valens and Ragaz. In 1794,