Archeological evidence suggests that hunter-gatherers were already settled in the lowlands north of the Alps in the Middle Paleolithic
period 150.000 years ago. Agriculture in Switzerland began around 5500 BC. By the Neolithic period, the area was relatively densely
populated.
Remains of Bronze Age pile dwellings from as early as 3800 BC have been found in the shallow areas of many lakes. Around 1500 BC,
Celtic tribes settled in the area. The Raetians lived in the eastern regions, while the west was occupied by the Helvetii.
Steadily harassed by Germanic tribes, in 58 BC, the Helvetii decided to abandon the Swiss Plateau and migrate to western Gallia. Julius
Caesar's armies pursued and defeated them at the Battle of Bibracte, in today's eastern France, forcing the tribe to move back
to its homeland. In 15 BC, Tiberius and his brother Drusus conquered the Alps, integrating them into the Roman Empire.
The first and second century AD was an age of prosperity on the Swiss Plateau. Towns such as Aventicum, Iulia Equestris and
Augusta Raurica, reached a remarkable size, while hundreds of agricultural estates (Villae rusticae) were established in the
countryside.
With the fall of the Western Roman Empire, Germanic tribes entered the area. Burgundians settled in the west; while in the
north, Alamanni settlers slowly forced the earlier Celto-Roman population to retreat into the mountains.
Burgundy became a part of the kingdom of the Franks in 534 and two years later, the dukedom of the Alamans followed.
Throughout the rest of the sixth, seventh and eighth centuries, Swiss regions continued under Frankish hegemony (Merovingian
and Carolingian dynasties) but after its extension under Charlemagne, the Frankish Empire was divided by the Treaty of
Verdun in 843. The territories of present-day Switzerland became divided into Middle Francia and East Francia until they were reunified
under the Holy Roman Empire around 1000 AD.
In the 12th century, the dukes of Z hringen were given authority over part of the Burgundy territories which covered the western
part of modern Switzerland. They founded many cities, including Fribourg in 1157, and Bern in 1191.
The Z hringer dynasty ended with the death of Berchtold V in 1218, and their cities subsequently became reichsfrei
(essentially a city-state within the Holy Roman Empire), while the dukes of Kyburg competed with the House of Habsburg
over control of the rural regions of the former Z hringer territory.
On 1 August 1291, the cantons of Uri, Schwyz, and Unterwalden united to defend the peace upon the death of Emperor
Rudolf I of Habsburg, forming the nucleus of the Old Swiss Confederacy.
By 1353, the three original cantons had been joined by the cantons of Glarus and Zug and the city-states of Lucerne, Z rich,
and Bern, forming the "Old Confederacy" of eight states that persisted during much of the 15th century.
At the Battle of Sempach in 1386, the Swiss defeated the Habsburgs, gaining increased autonomy within the Holy Roman Empire.
The Confederation's power and wealth increased significantly, with victories over Charles the Bold of Burgundy during the Burgundian
Wars (1474 1477), greatly due to the success of the Swiss Mercenaries, a powerful infantry force constituted by professional
soldiers originally from the cantons of the Old Swiss Confederacy.
The Swiss victory in the Swabian War against the Swabian League of Emperor Maximilian I in 1499 amounted to de facto
independence within the Holy Roman Empire.
The Reformation in Switzerland began in 1523, led by Huldrych Zwingli, priest of the Great Minster church in Z rich since 1518.
Z rich adopted the Protestant religion, joined by Berne, Basel, and Schaffhausen, while the other cantons remained Catholic.
This led to multiple inter-cantonal religious wars (Kappeler Kriege) in 1529 and 1531, as each canton usually made the opposing
religion illegal.
It was not until more than one hundred years after these internal wars that, in 1648, under the Peace of Westphalia, European countries
recognised Switzerland's independence from the Holy Roman Empire and its neutrality.
During the Early Modern period of Swiss history, the growing authoritarianism of the patriciate families combined with a financial crisis
in the wake of the Thirty Years' War led to the Swiss Peasant War of 1653. In the background to this struggle, the conflict
between Catholic and Protestant cantons persisted, erupting in further violence at the First War of Villmergen, in 1656, and
the Toggenburg War, in 1712.
During the French Revolutionary Wars, the French army invaded Switzerland and turned it into an ally known as the "Helvetic Republic"
(1798 1803). In 1815 the Congress of Vienna fully re-established Swiss independence, and the European powers recognised permanent
Swiss neutrality.
The restoration of power to the patriciate was only temporary. After a period of unrest with repeated violent clashes, such as the
Z riputsch of 1839, civil war (the Sonderbundskrieg) broke out in 1847 when some Catholic cantons tried to set up a separate
alliance (the Sonderbund).
As a consequence of the civil war, Switzerland adopted a federal constitution in 1848, amending it extensively in 1874 and
establishing federal responsibility for defense, trade, and legal matters, leaving all other matters to the cantonal governments. From then,
and over much of the 20th century, continuous political, economic, and social improvement has characterized Swiss history.
During World War I and World War II, Switzerland maintained armed neutrality, and was not invaded by its neighbors,
in part because of its topography, much of which is mountainous. Germany was a threat and Switzerland built a powerful defense. It served
as a "protecting power" for the belligerents of both sides, with a special role in helping prisoners of war.
Switzerland's role in many United Nations and international organizations helped to mitigate the country's concern for neutrality. In 2002,
Switzerland voters gave 55% of their vote in favour of the UN and joined the United Nations.
Switzerland is not a member state of the EU but has been (together with Liechtenstein) surrounded by EU territory since the joining of Austria
in 1995. In 2005, Switzerland agreed to join the Schengen treaty and Dublin Convention by popular vote.
In February 2014, Swiss voters approved a referendum to reinstitute quotas on immigration to Switzerland, setting off a period of finding
an implementation that would not violate the EU's freedom of movement accords that Switzerland adopted.