In 1798, the French invasion of Switzerland brought about the collapse of the Old Confederacy, which was replaced with the Helvetic Republic, representing an attempt to impose a central authority over Switzerland. However, a federalist revolt eventually overthrew the Republic, restoring the cantons and re-establishing a federal and decentralized Swiss Confederation. Following the defeat and dissolution of the First French Empire in the War of the Sixth Coalition, Cantonal constitutions began to be worked out independently and the Federal Diet was reconvened to replace the constitution with a new Federal Treaty, beginning the restoration of the "Ancien Régime".