from Sweden and fled south into Ottoman territory, where he remained three years. He overstayed his welcome, refusing to leave until the Ottoman Empire joined him in a new war against Tsar Peter I of Russia. He established a powerful political network in Constantinople, which included even the mother of the sultan. Charles's persistence worked, as Peter's army was checked by Ottoman troops. However, Turkish failure to pursue the victory enraged Charles and from that moment his relations with the Ottoman administration soured. During the same period, the behavior of his troops worsened and turned disastrous. Lack of discipline and contempt for the locals soon created an unbearable situation in Moldavia. The Swedish soldiers behaved badly, destroying, stealing, raping, and killing. Meanwhile, back in the north, Sweden was invaded by its enemies; Charles returned home in 1714, too late to restore his lost empire and impoverished homeland; he died in 1718. In the subsequent peace treaties, the allied powers, joined by Russia and Great Britain-Hanover, ended Sweden's reign as a great power. Russia now dominated the north. The war-weary Riksdag asserted new powers and reduced the crown to a constitutional monarchy, with power held by a civilian government controlled by the Riksdag. A new "Age of Freedom" opened, and the economy was rebuilt, supported by large exports of iron and lumber to Britain. The Riksdag developed into an active parliament. This tradition continued into the nineteenth century, laying the basis for the transition towards a modern democracy. The reign of Charles XII (1697–1718) has stirred up great controversy. Historians have puzzled over why this military genius overreached and greatly weakened Sweden. Although most early-19th-century historians tended to follow Voltaire's lead in bestowing extravagant praise on the warrior-king, others have criticised him as a fanatic, a bully, and a bloodthirsty warmonger. A more balanced view suggests a highly capable military ruler whose oft-reviled peculiarities seemed to have served him well, but who neglected his base in Sweden in pursuit of foreign adventure. Slow to learn the limits of Sweden's diminished strength, a party of nobles, who called themselves the "Hats", dreamed of revenge on Russia and ruled the country from 1739 to 1765; they engaged in wars in 1741, 1757, 1788, and 1809, with more or less disastrous results as Russian influence grew after every Swedish defeat. Enlightenment Sweden joined in the Enlightenment culture of the day in the arts, architecture,