The Habsburgs appointed a succession of vassals to administer the area for them, especially the Kyburgs who also owned Thun Castle. Following the Kyburg defeat in the Burgdorferkrieg of 1383-84 and the decisive Habsburg defeat at the Battle of Sempach in 1386, Bern began to expand into the Austrian lands in the Bernese Oberland. They occupied Oberhofen in 1386 and were finally able to purchase or usurp all the land and rights from every feudal land holder in 1397.