In the early 17th century, the aristocratic governors of the districts in the Upper Valais pressured the prince-bishop of Sion to abdicate secular power, which was achieved temporarily in 1613 and then permanently in 1634, when the country became the federal Republic of the Seven Tithings under the rule of a Landeshauptmann. The republic in its original form existed until 1798, when the districts of the Lower Valais, until then ruled as subjects, successfully revolted against the Seven Tithings and achieved equal status within the republic. During the French invasion of the Swiss Confederacy in the same year, Valais was incorporated into the Helvetic Republic until 1802 when it became the separate Rhodanic Republic.
In 1810 the Rhodanic Republic was annexed by the First French Empire as the departement of Simplon. The department was occupied by Austrian troops in late 1813, and on 4 August 1815 Valais finally entered the Swiss Confederation as a canton. In 1845, Valais joined the Catholic separatist league (Sonderbund) which led to what is called the Sonderbund War. 99,000 Swiss Federal troops under General Henri Dufour were faced by 79,000 Separatists, but in the end, Valais chose not to fight.
The beginning of the modern history of Valais essentially coincides with the exploration of the High Alps, the first ascent of the Matterhorn in 1865 making the end of the golden age of alpinism. The boom of tourism followed in the late 19th century.