During the 1798 French invasion of Switzerland, local peasants rose up in rebellion and attacked Kyburg Castle. The French controlled Helvetic Republic swept away the old feudal organizations including the County of Kyburg. It was dissolved and the area divided between several new districts. After the fall of Napoleon and the restoration in Switzerland, Kyburg and Pfäffikon were combined into a district in 1815. However, it was short lived and in 1831 the district was dissolved and the administrative seat moved away from Kyburg Castle.