Archeological evidence suggests that hunter-gatherers were already settled in the lowlands north of the Alps in the late Paleolithic period. By the Neolithic period, the area was relatively densely populated. Remains of bronze age pile dwellings 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.
In 58 BC, the Helvetii tried to evade migratory pressure from Germanic tribes by moving into Gaul, but were defeated at Bibracte by Julius Caesar's armies and then sent back. The alpine region became integrated into the Roman Empire and was extensively romanized in the course of the following centuries. The center of Roman administration was at Aventicum (Avenches). In 259, Alamanni tribes overran the Limes, putting the settlements on Swiss territory on the frontier of the Roman Empire.
The first Christian bishoprics were founded in the 4th century. 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; two years later, the dukedom of the Alamans followed suit. In the Alaman-controlled region, only isolated Christian communities continued to exist and Irish monks re-introduced the Christian faith in the early 7th century.
Under the Carolingian kings, the feudal system proliferated, and monasteries and bishoprics were important bases for maintaining the rule. The Treaty of Verdun of 843 assigned Upper Burgundy (the western part of what is today Switzerland) to Lotharingia, and Alemannia (the eastern part) to the eastern kingdom of Louis the German which would become part of the Holy Roman Empire.
In the 10th century, as the rule of the Carolingians waned Saracenes ravaged the Valais, and Magyars destroyed Basel in 917 and St. Gallen in 926. Only after the victory of king Otto I over the Magyars in 955 in the Battle of Lechfeld, were the Swiss territories were reintegrated into the empire.
In the 12th century, the dukes of Zähringen were given authority over part of the Burgundy territories which coverd the western part of modern Switzerland. They founded many cities, including Fribourg in 1157, and Berne 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.
Under the Hohenstaufen rule, the alpine passes in Raetia and the St. Gotthard Pass gained importance. The latter especially became an important direct route through the mountains. Uri (in 1231) and Schwyz (in 1240) were accorded the Reichsfreiheit to grant the empire direct control over the mountain pass. Most of the territory of Unterwalden at this time belonged to monasteries which had previously become reichsfrei.
The extinction of the Kyburg dynasty paved the way for the Habsburg dynasty to bring much of the territory south of the Rhine under their control, aiding their rise to power. Rudolph I of Habsburg, who became Holy Roman Emperor in 1273, effectively revoked the status of Reichsfreiheit granted to the "Forest Cantons" of Uri, Schwyz, and Unterwalden. The Forest Cantons thus lost their independent status and were governed by reeves.