The history of Schleswig-Holstein consists of the corpus of facts since the pre-history times until the modern establishing of the Schleswig-Holstein state.
Early history
The Jutland Peninsula is a peninsula in Northern Europe with modern-day Schleswig-Holstein at its base. Schleswig is also called Southern Jutland (Sønderjylland). The old Scandinavian sagas, perhaps dating back to the times of the Angles and Jutes give the impression that Jutland has been divided into a northern and a southern part with the border running along the Kongeå River.
Taking into account both archeological findings and Roman sources, however, one could conclude that the Jutes inhabited both the Kongeå region and the more northern part of the peninsula, while the native Angles lived approximately where the towns Haithabu and Schleswig later would emerge (originally centered in the southeast of Schleswig in Angeln), the Saxons (earlier known apparently as the Reudingi) originally centered in Western Holstein (known historically as "Northalbingia") and Slavic Wagrians, part of the Obodrites (Abodrites) in Eastern Holstein. The Danes settled in the early Viking ages in Northern and Central Schleswig and the Northern Frisians after approximately the year 900 in Western Schleswig.
The pattern of populated and unpopulated areas was relatively constant through Bronze Age and Iron Age.
After the Dark Ages migrations
After many Angles emigrated to the British Islands in the 5th century, the land of the Angles came in closer contact with the Danish islands — plausibly by partly immigration/occupation by the Danes. Later also the contacts increased between the Danes and the people on the northern half of the Jutish peninsula.
Judging by today's placenames, then the southern linguistic border of the Danish language seems to have been (starting at the west) up the Treene river, along the Danevirke (also known as Danewerk), then cutting across from the Schlei estuary to Eckernförde, and leaving the Schwansen peninsula, while the West coast of Schleswig had been the area of the Frisian language.
After the Slavic migrations, the eastern area of modern Holstein was inhabited by Slavic Wagrians (Vagri) a subgroup of the Obotrites (Obotritae).
Nordalbingia and Wagria in 8th–9th centuries
Apart from northern Holstein and Schleswig inhabited by Danes there were Nordalbingia and Wagria in respectively, Western and Eastern Holstein.
Nordalbingia (German: Nordalbingien, i.e. land north of the Elbe river) was one of the four administrative regions of the medieval Duchy of Saxony, the others being Angria, Eastphalia, and Westphalia. Nordalbingia consisted of four districts: Dithmarschen, Holstein, Stormarn (north of the Elbe) and Hadeln (south of the Elbe).
The Wagri, Wagiri, or Wagrians were a tribe of Polabian Slavs inhabiting Wagria, or eastern Holstein in northern Germany, from the ninth to twelfth centuries. They were a constituent tribe of the Obodrite confederacy.
Conquest of Nordalbingia by Obodrites and Franks
In the Battle of Bornhöved (798) (German: Schlacht bei Bornhöved) on the field of Sventanafeld (Sventanapolje, Slavonic for "sacred field") near the village of Bornhöved near Neumünster in 798 the Obodrites, led by Drożko, allied with the Franks, defeated the Nordalbingian Saxons.
Following the Nordalbingian defeat in the Battle of Bornhöved by combined forces of the Obodrites and the Franks, where the Saxons lost 4,000 people, 10,000 Saxon families were deported to other areas of the empire. Areas north of Elbe (Wagria) were given to the Obodrites, while Hadeln was directly incorporated. However, the Obodrites soon were invaded by Danes and only the intervention of Charlemagne pushed the Danes out of Eider river.
Danes, Saxons, Franks struggle for control of Holstein
As Charlemagne extended his realm in the late 8th century, he met a united Danish army which successfully defended Danevirke, a fortified defensive barrier across the south of the territory west of the Schlei. A border was established at the Eider River in 811.
This strength was enabled by three factors: the fishing, the good soil giving good pasture and harvests in particular the tax and customs revenues from the market in Haithabu, where all trade between the Baltic Sea and Western Europe passed.