feudal lords, particularly under various lines of the Habsburg family, to which many Liechtensteins were close advisors. Thus, without holding any land directly under the Holy Roman Emperors, the Liechtenstein dynasty was unable to meet the primary requirement to qualify for a seat in the Imperial Diet, (German Reichstag), although its head was elevated to princely rank in the late 17th century. Early modern era The area that was to become Liechtenstein was invaded by both Austrian and Swedish troops during the Thirty Years' War of 1618–1648. During the 17th century the country was afflicted by a plague and also by the Liechtenstein witch trials, in which more than 100 persons were persecuted and executed. Prince Johann Adam Andreas of Liechtenstein bought the domain of Schellenberg in 1699 and the county of Vaduz in 1712. This Prince of Liechtenstein had wide landholdings in Austria, Bohemia and Moravia, but none of his lands were held directly from the Emperor. Thus, the prince was barred from entry to the Council of Princes and the prestige and influence that would entail. By acquiring the Lordships of Schellenberg and Vaduz, modest areas of mountain villages each of which was directly subordinate to the Emperor because there no longer being a Duke of Swabia, the Prince of Liechtenstein achieved his goal. The territory took the name of the family which now ruled it. On January 23, 1719, Charles VI, Holy Roman Emperor, decreed that the counties of Vaduz and Schellenberg be promoted to a principality with the name Liechtenstein for his servant Anton Florian of Liechtenstein whereby he and his successors became Princes of the Holy Roman Empire. Nineteenth century After having narrowly escaped mediatisation to Bavaria in 1806, Liechtenstein became a sovereign state later that year when it joined Napoleon's Confederation of the Rhine upon the dissolution of the Holy Roman Empire. The French under Napoleon occupied the country for a few years, but Liechtenstein retained its independence in 1815. Soon afterward, Liechtenstein joined the German Confederation (20 June 1815 – 24 August 1866, which was presided over by the Emperor of Austria). Then, in 1818, Johann I granted a constitution, although it was limited in its nature. 1818 also saw the first visit of a member of the house of Liechtenstein, Prince Alois. However, the first visit by a sovereign prince did not occur until 1842. In 1862, a new Constitution was promulgated,