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.
Main article: Switzerland in the Roman era
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.
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 Saxons was divided and partially dissolved in 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.
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.
The Principality takes its name from the Liechtenstein family, rather than vice versa, and the family in turn takes its name from Liechtenstein Castle in Lower Austria, which it owned from at least 1140 until the 13th century and from 1807 onwards. Over the centuries, the family acquired huge landed estates, mostly in Moravia, Lower Austria and Styria.
All of these rich territories were held in fief under other more senior 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.
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.
After having narrowly escaped mediatization 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, which provided for a Diet representative of the people.
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”. The Prince refused to have his men fight against other Germans. The Liechtenstein contingent took up position on the Stilfse Joch 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. When the war ended on July 22, 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. Apparently an Italian liaison officer joined up with the contingent on the way back.
In 1868, after the German Confederation dissolved, Liechtenstein disbanded its army of 80 men and declared its permanent neutrality, which was respected during both World Wars.
Liechtenstein did not participate in World War I, claiming neutrality. However, until the end of the war, Liechtenstein was closely tied to Austria. In response, the Allied Powers imposed an economic embargo on the principality. The economic devastation forced the country to conclude a customs and monetary union with Switzerland. In 1919 Liechtenstein and Switzerland signed a treaty under which Switzerland assumes the representation of Liechtenstein interests at the diplomatic and consular level in countries where it maintains a representation and Liechtenstein does not.
In the spring of 1938, just after the annexation of Austria into Greater Germany, eighty-four-year-old Prince Franz I abdicated and was succeeded by his thirty-one-year-old grand nephew, Prince Franz Joseph II. While Prince Franz I claimed that old age was his reason for abdicating, it is believed that he had no desire to be on the throne if Germany were to invade and occupy its new neighbour, Liechtenstein. The Princess of Liechtenstein Elisabeth von Gutmann, whom he married in 1929, was a wealthy Jewish woman from Vienna, and local Liechtenstein Nazis had already singled her out as their anti-Semitic "problem". A Nazi sympathy movement had been simmering for years within its National Union party and there was a national socialist political party - the German National Movement in Liechtenstein.
Prince Franz Josef II became the first Prince of Liechtenstein to take up permanent residence in Liechtenstein.
During World War II, Liechtenstein remained neutral, while family treasures within the war zone were brought to Liechtenstein (and London) for safekeeping. At the close of the conflict, Czechoslovakia and Poland, acting to seize what they considered to be German possessions, expropriated the entirety of the Liechtenstein dynasty's hereditary lands and possessions in Bohemia, Moravia, and Silesia — the princes of Liechtenstein lived in Vienna until the Anschluss of 1938. The expropriations (subject to modern legal dispute at the International Court of Justice) included over 1,600 square kilometres (600 sq mi) of agricultural and forest land (most notably the UNESCO listed Lednice–Valtice Cultural Landscape), and several family castles and palaces. Citizens of Liechtenstein were also forbidden from entering Czechoslovakia during the Cold War.
Liechtenstein gave asylum to approximately five-hundred soldiers of the First Russian National Army (a collaborationist Russian force within the German Wehrmacht) at the close of World War II. This is commemorated by a monument at the border town of Hinterschellenberg which is marked on the country's tourist map. The act of granting asylum was no small matter as the country was poor and had difficulty feeding and caring for such a large group of refugees. Eventually, Argentina agreed to permanently resettle the asylum seekers. In contrast, the British repatriated the Russians who fought on the side of Germany to the USSR, where they were summarily treated as traitors and most of them executed, including their families.
In dire financial straits following the war, the Liechtenstein dynasty often resorted to selling family artistic treasures, including for instance the portrait "Ginevra de' Benci" by Leonardo da Vinci, which was purchased by the National Gallery of Art of the United States in 1967. Liechtenstein prospered, however, during the decades following, as its economy modernized with the advantage of low corporate tax rates which drew many companies to the country. Liechtenstein became increasingly important as a financial center.
In 1989, Prince Hans-Adam II succeeded his father to the throne, and in 1996, Russia returned the Liechtenstein family's archives, ending a long-running dispute between the two countries. In 1978, Liechtenstein became a member of the Council of Europe, and then joined the United Nations in 1990, the European Free Trade Association (EFTA) in 1991, and both the European Economic Area (EEA) and World Trade Organization in 1995.
In a referendum on March 16, 2003, Prince Hans-Adam, who had threatened to leave the country if he lost, won a large majority (64.3%) in favour of overhauling the constitution to effectively give him more powers than any other European monarch. The new constitution gave the prince the right to dismiss governments and approve judicial nominees and allowed him to veto laws simply by refusing to sign them within a six-month period.
On August 15, 2003, Hans-Adam announced he would step down in one year and hand over the reins to his son Alois. In August 2004, Prince Hans-Adam handed over the practical running of the principality to his son, Crown Prince Alois, although still remaining official head of state.
On July 1, 2007, the first two consuls in the history of the Principality were appointed to represent Liechtenstein in the United States of America.
In June 2012, the voters decided in the constitutional referendum that Crown Prince Alois should be allowed to retain his power of veto over decisions made in nationwide ballots.