The city of St. Gallen proper progressively freed itself from the rule of the abbot, acquiring Imperial immediacy, and by 1401 is recognized as a Free imperial city.
By about 1353 the guilds, headed by the cloth-weavers guild, had gained control of the civic government In 1415 the city buys its liberty from the German king Sigismund.