Political identity came to the territory now occupied by the Principality of Liechtenstein in 814, with the formation of the subcountry of Lower Rhætia. Liechtenstein's borders have remained unchanged since 1434, when the Rhine established the border between the Holy Roman Empire and the Swiss cantons.

Antiquity

The area that is now Liechtenstein was part of the Roman province of Rhaetia. A Roman road crossed the region from south to north, traversing the Alps by the Splügen Pass and, following the right bank of the Rhine at the edge of the floodplain, was uninhabited for long lengths of time because of periodic flooding. Roman villas have been excavated in Schaanwald and Nendeln. The late Roman influx of the Alemanni from the north is memorialized by the remains of a Roman fort at Schaan.

Middle Ages

The area, part of Raetia, was incorporated into the Carolingian Empire, and divided into countships, which became subdivided over the generations. Because the Duchy of Swabia lost its duke in 1268 and was never restored, all vassals of the duchy became immediate vassals of the Imperial Throne (as has happened in much of Westphalia when the duchy of Saxony was divided and partially dissolved in the aftermath of the defeat of Henry the Lion). Until about 1100, the predominant language of the area was Romansch, but thereafter German gained ground, and in 1300 an Alemannic population called the Walsers (originating in Valais) entered the region. In the 21st century, the mountain village of Triesenberg still preserves features of Walser dialect.P. Christiaan Klieger, The Microstates of Europe: Designer Nations in a Post-Modern World (2014), p. 41

The medieval County of Vaduz was formed in 1342 as a small subdivision of the Werdenberg county of the dynasty of Montfort of Vorarlberg. The 15th century brought three wars and some devastation. Centuries later, Carl Alexander Heideloff built Lichtenstein Castle (with the help of peasants). However, the 17th century was a low point. 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 witch trials, in which more than 100 people were persecuted and executed.

The House of Liechtenstein, which would later form the modern principality, derives its name from the Liechtenstein Castle in Lower Austria, built in the 12th century. The heads of the Liechtenstein family were often subservient and acted as advisors to the Holy Roman Emperor, which allowed them to obtain lands mostly in Moravia, Lower Austria and Styria over the centuries. Karl of Liechtenstein was the Obersthofmeister in the court of Rudolf II, a position which he held until 1607. However, during the dispute between Rudolf and his brother Matthias, Karl sided with Matthias. In return, Matthias, now Archduke of Austria, elevated the House of Liechtenstein to hereditary prince status on 20 December 1608, thus making Karl the first sovereign Prince of Liechtenstein as Karl I.

During the Bohemian Revolt (1618–1620), the house of Liechtenstein lost most of its possessions in Moravia. Karl I and his brother Maximilian played a leading role in the Battle of White Mountain in November 1620, when the following year Karl I conducted the trials and executions of the revolt leaders on behalf of Ferdinand II. In exchange for their services, Ferdinand II again elevated Karl I, along with his brothers Maximillian and Gundaker, to Imperial prince along with granting the family numerous estates in Moravia and Silesia. In 1622, the House of Liechtenstein purchased the lands of Mährisch Kromau and Ungarisch Ostra. In 1633, the two areas were bestowed the name of the Principality of Liechtenstein by Ferdinand II, though this name largely fell out of use by 1647.

Early modern era Prince Johann Adam Andreas of Liechtenstein bought the Lordship 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 Imperial Diet 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 was no longer a Duke of Swabia, the Prince of Liechtenstein achieved his goal. The territory took the name of the family which now ruled it. On 23 January 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.

The prince never visited his principality, and the first visit of a sovereign prince to Liechtenstein did not occur until 1842. Instead, they were represented by the local district office based in Vaduz, consisting of a number of officials, which was regulated by civil service law. It served as the only form of administration in the country until its disbandment in 1848, and was primarily responsible for controlling the country's tax office and reporting significant developments to the prince, who resided in Vienna. Until the end of the 17th century, officials were primarily recruited from neighbouring Vorarlberg, and were paid directly by the prince.

Nineteenth century

French revolutionary and Napoleonic wars

In the War of the First Coalition, Liechtenstein, as part of the Holy Roman Empire contributed approximately 20 troops to the coalition forces from 1793 to 1796. During the War of the Second Coalition, France invaded the country on 6 March 1799 and plundered several towns, including Nendeln which was burned by French troops resulting in the deaths of four people. The Austrian and Vorarlberg state militias under command of Lieutenant field marshal Franjo Jelačić defeated 18,000 French troops stationed in Liechtenstein under command of General André Masséna and liberated the country by 14 May.

In 1806, Liechtenstein was one of the principalities and counties Maximilian I of Bavaria wanted to annex as his price for joining the Confederation of the Rhine but Napoleon refused because he had appreciated the personal qualities of Johann I, Austria's envoy during the negotiations leading to the Treaty of Pressburg, as a negotiator. Thus 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 principality for a few years, but Liechtenstein regained 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). 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 1833, Michael Menzinger applied for the role of . The role originated from the 16th century and functioned as the head of the district office (), subordinate to the court of the House of Liechtenstein. It was previously an undesired role within the court, but Menzinger applying for the role changed this. For this reason, he is considered the first governor of Liechtenstein.

Constitution and latter century Like most of Europe at the time, Liechtenstein was subject to the German revolutions of 1848–1849 which caused increased opposition to the absolute monarchy of Aloys II. The aim of the revolution was to improve the economic and political situation of ordinary citizens in Liechtenstein, primarily fuelled by the worsening economy in the country in the years prior. On 22 March 1848, the people's committee appointed a three-person committee to lead the Liechtenstein revolutionary movement, which included Peter Kaiser, Karl Schädler and Ludwig Grass. Together, they managed to maintain order in Liechtenstein and formed a constitutional council. Liechtenstein was a member of the National Assembly in Frankfurt until April 1849.

Following the revolution, a constitutional council was elected on 27 July 1848 in response to popular demand from the revolutionaries, of which Schädler was elected as its president. The primary task of the council was to create the draft for a new Liechtenstein constitution, the work of which was done primarily by him and Michael Menzinger. As a concession towards the revolution, the district office was disbanded and replaced by a District Council that was formed on 7 March 1849 with 24 elected representatives and which acted as the first democratic representation in Liechtenstein, with Schädler elected as District Administrator. In addition, the title of Landvogt was changed to governor () with Menzinger continuing in the role.

After the failure of the German revolutions, Aloys II once again regained absolute power over Liechtenstein on 20 July 1852 and disbanded the District Council. However, calls for a new constitution once again appeared early in the reign of Johann II. Karl Schädler formed the constitutional council anew, leading it, and drafted the majority of another new constitution. The draft was reviewed by an unknown German legal expert and formed the basis of the 1862 Constitution of Liechtenstein, which was ratified on 26 September. It was heavily inspired by the constitution of Vorarlberg and largely addressed the demands of the revolutionaries in Liechtenstein. This constitution established civil liberties in the country and formed the Landtag of Liechtenstein for the first time.

During the Austro-Prussian War of 1866, Prince Johann II placed his soldiers at the disposal of the Confederation but only to “defend the German territory of Tyrol”. However, the Landtag had not been consulted regarding the deployment and the war was unpopular among the population, as such it faced resistance from the Landtag. As a result, Johann II promised a loan to the country and refused to have his men fight against other Germans. The Liechtenstein contingent took up position on the Stilfser Joch under the command of Peter Rheinberger in the south of Liechtenstein to defend the Liechtenstein/Austrian border against attacks by the Italians under Garibaldi. A reserve of 20 men remained in Liechtenstein at Vaduz Castle. When the war ended on 22 July, the army of Liechtenstein marched home to a ceremonial welcome in Vaduz. Popular legend claims that 80 men went to war, but 81 came back. It is disputed who the additional person was; an Austrian liaison officer may have joined up with the contingent on the way back, but it has also been claimed that the man was an Italian farmer.

The German Confederation was dissolved in 1866. Together with its unpopularity among the population and the rising cost to maintain it, Liechtenstein disbanded its army of 80 men on 12 February 1868 and declared its permanent neutrality, neither joining the new German Empire in 1871, nor the Austrian Empire. In 1893, former soldiers of the Liechtenstein army founded a veterans association, which had 141 members in 1896. Its last surviving member, Andreas Kieber, died in 1939, aged 94 years old. This neutrality was respected during both World Wars, and ultimately would allow the country to avoid the fate of the other German monarchies.

Liechtenstein during the world wars

World War I