Holy Roman Empire. Zürich was expelled from the Confederation from 1440 to 1450 due to a conflict over the territory of Toggenburg (the Old Zürich War). The Confederation's power and wealth increased significantly, with victories over Charles the Bold of Burgundy during the Burgundian Wars (1474–1477), greatly due to the success of the Swiss mercenaries, a powerful infantry force constituted by professional soldiers originary from the cantons of the Old Swiss Confederacy. They were notable for their service in foreign armies, especially among the military forces of the Kings of France, throughout the Early Modern period of European history, from the Late Middle Ages into the Renaissance. Their service as mercenaries was at its peak during the Renaissance when their proven battlefield capabilities made them sought-after mercenary troops. The traditional listing order of the cantons of Switzerland reflects this state, listing the eight "Old Cantons" first, with the city-states preceding the founding cantons, followed by cantons that joined the Confederation after 1481, in historical order. The Swiss defeated the Swabian League in 1499 and gained greater collective autonomy within the Holy Roman Empire, including exemption from the Imperial reforms of 1495 and immunity from most Imperial courts. In 1506, Pope Julius II engaged the Swiss Guard, which continues to serve the papacy to the present day. The expansion of the Confederation and the reputation of invincibility acquired during the earlier wars suffered a first setback in 1515 with the Swiss defeat in the Battle of Marignano and Battle of Bicocca. Reformation The Reformation in Switzerland began in 1523, led by Huldrych Zwingli, priest of the Great Minster church in Zürich since 1518. Zürich adopted the Protestant religion, joined by Berne, Basel, and Schaffhausen, while Lucerne, Uri, Schwyz, Nidwalden, Zug, Fribourg, and Solothurn remained Catholic. Glarus and Appenzell were split. This led to multiple inter-cantonal religious wars (Kappeler Kriege) in 1529 and 1531, because each canton usually made the opposing religion illegal, and to the formation of two diets, the Protestant one meeting in Aarau and the Catholic one in Lucerne (as well as the formal full diet still meeting usually in Baden) but the Confederation survived. Early Modern Switzerland During the Thirty Years' War, Switzerland was a relative "oasis of peace and prosperity" (Grimmelshausen) in war-torn Europe, mostly because all major powers in Europe depended on Swiss mercenaries, and would not let Switzerland fall into the hands of one of