In the early 13th century, the Franciscans ("Friars Minor") established a monastery in the town. They obtained permission to build their church and quarters directly up against the town wall, thereby obliterating the watch walk on the inside of the wall that was crucial for quickly moving defenders from one part of the wall to another. In exchange they had to agree to defend their part of the town's fortification in the event of a siege. The Franciscans were forced to leave when the Lutheran Reformation was introduced in 1522. Following the Counterreformation, Jesuits moved in during 1615, followed by the return of the Franciscans in 1619. The monastery was dissolved in 1811. Its splendid Gothic church, completed in 1244, today serves as the parish church for the town's Protestant Christians who purchased it in 1817/1824.