In 1385, Zug joined the league of the Swabian cities against Leopold III of Austria and shared in the victory of Sempach, as well as in the various Argovian (1415) and Thurgovian (1460) conquests of the Confederates, and later in those of Italy (1512), having already taken part in the occupation of the Val d'Ossola. Between 1379 (Walchwil) and 1477 (Cham), Zug had acquired various districts in its own neighborhood, principally to the north and the west, which were ruled till 1798 by the town alone as subject lands.