the Habsburgs would annex their countries as Habsburg property. War broke out over a dispute between the Confederates of Schwyz and the Habsburg-protected monastery of Einsiedeln regarding some pastures, and eventually, the Confederates of Schwyz conducted a raid on the monastery. In support of their allies, Unterwalden joined the Confederates in the Battle of Morgarten and drove back an invasion of the Brünig Pass. After the decisive Confederation victory over the Habsburgs, Unterwalden renewed the Eternal Alliance in the Pact of Brunnen. During the 14th century, the communities in Obwalden grew increasingly powerful at the expense of the nobility. The formerly powerful Kellner of Sarnen family retired from politics after 1307. The White Book of Sarnen mentions the conquest of the Lower Castle in Sarnen, the home of the family, which may explain why they left politics. The Strättligen and Ringgenberg families married into the Lords of Hunwil and used the power of the dynastic marriages to reduce Habsburg power to a vague suzerainty in the 1330s and 40s, though the Habsburg still owned some land in Obwalden. During the early 14th century, an organization of livestock farmers developed in the Hunwil lands. Throughout the century, their political power grew as they acquired more land and grew wealthy. The organization eventually became an alternative political structure and following conflicts between the organization and the Hunwil nobles, in 1382 the Landsgemeinde excluded the Hunwils from holding political or court offices. During the 13th and 14th century Obwalden established its own local governance, despite having had a joint assembly with Nidwalden up to around 1330. During the 14th century, Obwalden participated in several other wars with the Swiss Confederation, including the Battle of Sempach in 1386 and the Gugler war in 1375. It peacefully acquired Alpnach in 1368 and Hergiswil in 1378. In 1403 Obwalden joined Uri to invade the Leventina area (today located in the canton of Ticino) to establish new markets for cheese and cattle. They conquered the Val d' Ossola in 1410. In 1419 the Confederation bought Bellinzona. Milan attacked the city three years later in 1422 after an offer to buy Bellinzona was rejected by the Swiss Confederation. The troops from Uri and Obwalden were quickly driven from the city and later defeated at the Battle of Arbedo on 30 June 1422. This defeat drove the Confederates out of Bellinzona and the Val d' Ossola and Leventina. An