After the Battle of Sempach in 1386, where the Swiss Confederation defeated the troops led by Duke Leopold III of Habsburg, the Bernese established their authority over the area. However, there were continued clashes with the authorities in Lucerne. In 1528, Bern imposed the Protestant religion on the entire region.