with the confederation, completing the "Confederacy of the Eight Cantons" (). This alliance of the was not a homogeneous state but rather a conglomerate of eight independent cities and lands, held together not by one single pact but by a net of six different "eternal" pacts, none of which included all eight parties as signatories. Only the three Uri, Schwyz, and Unterwalden were part of all these treaties. All eight parties would still pursue their own particular interests, most notably in the cases of the strong cities of Zürich and Bern. Zürich was also part of an alliance of cities around Lake Constance which also included Konstanz, Lindau and Schaffhausen and for some time included cities as far away as Rottweil or Ulm, and Bern followed its own hegemonial politics, participating successively in various alliances with other cities including Fribourg, Murten, Biel or Solothurn. This Bernese "Burgundian Confederation" was a more volatile construct of varying alliances, and in the Battle of Laupen (1339), Fribourg even sided against Bern. Bern's position after that battle was strong enough that such alliances often ended with the other party becoming a Bernese dependency, as it happened with e.g. Burgdorf or Payerne. An external threat during this time arose in the form of the Guglers, marauding mercenary knights from France who were beaten back under the leadership of Bern in December 1375. Consolidation In 1364, Schwyz re-conquered the city and land of Zug and renewed the alliance the following year. In the 1380s, Lucerne expanded its territory aggressively, conquering Wolhusen, claiming sovereignty over the valley of the Entlebuch and the formerly Habsburg city of Sempach. As a consequence, Leopold III of Austria assembled an army and met the Eidgenossen near Sempach in 1386, where his troops were defeated decisively in the Battle of Sempach and he himself was killed. In the wake of these events Glarus declared itself free and constituted its first Landsgemeinde (regional diet) in 1387. In the Battle of Näfels in 1388, an Austrian army of Albert III, the successor of Leopold, was defeated, and in the peace treaty concluded the next year, Glarus maintained its independence from the Habsburgs. The loose federation of states was reinforced by additional agreements amongst the partners. In the Pfaffenbrief of 1370, the signatory six states (without Bern and Glarus) for the first time expressed themselves as a territorial unity, referring to themselves as unser Eydgnosschaft.