Instead, they were able to expand southwards: in 1311, they took over Savinja; after the death of Henry in 1335, they assumed power in Carniola and Carinthia; and in 1369, they succeeded his daughter Margaret in Tyrol. After the death of Albert III of Gorizia in 1374, they gained a foothold at Pazin in central Istria, followed by Trieste in 1382. Meanwhile, the original home territories of the Habsburgs in what is now Switzerland, including the Aargau with Habsburg Castle, were lost in the 14th century to the expanding Swiss Confederacy after the battles of Morgarten (1315) and Sempach (1386). Habsburg Castle itself was finally lost to the Swiss in 1415.