a realm somewhat partitioned to Catholic factions in the region, and entirely ravaged by the war. In the Duchy itself, battle, famine, plague and war reduced the Duchy's population of 350,000 in 1618 to 120,000 in 1648 – about 57% of the population of Württemberg. Recovery would be slow for the next several decades, but began nonetheless with the city's first bookstore in 1650 and high school in 1686. This progress was almost entirely undone when French soldiers under Ezéchiel du Mas appeared outside the city's walls in 1688 during the Nine Years' War, but the city was saved from another sack due to the diplomatic ability of Magdalena Sibylla, reigning over Württemberg as regent for her son, Eberhard Ludwig. For the first time in centuries, Duke Eberhard Ludwig moved the seat of the Duchy out of the declining city of Stuttgart in 1718 to Ludwigsburg, founded in 1704, while the namesake Baroque palace, known as the "Versailles of Swabia", was still under construction. When Eberhard Ludwig died, his nephew Charles Alexander, ascended to the throne. Charles Alexander himself died in 1737, meaning his son Charles Eugene became the premature Duke (and later King) at the age of nine. When he came of age and returned from his tutoring at the court of Frederick the Great, King of Prussia, Charles desired to move the capital back to Stuttgart. He commissioned the construction of the New Castle in 1746, Castle Solitude in 1763, Castle Hohenheim in 1785, and the Karlsschule in 1770. The rule of Charles Eugene also saw the tutoring and origins of Friedrich Schiller in Stuttgart, who studied medicine and completed The Robbers here. Stuttgart, at the end of the 18th century, remained a very provincial town of 20,000 residents, narrow alleys, and agriculture and livestock. Despite being the capital and seat of the Duchy, the general staff of the Army of Württemberg was not present in the city. In 1794, Duke Charles dissolved the Karlsschule to prevent the spreading of revolutionary ideas. Stuttgart was proclaimed capital once more when Württemberg became an electorate in 1803, and was yet again named as capital when the Kingdom of Württemberg was formed in 1805 by the Peace of Pressburg. Kingdom of Württemberg and German Empire King Frederick I's Württemberg was given high status in the Confederation of the Rhine among the College of Kings, and the lands of nearby secondary German