The term "Heptarchy" (from the Greek ἑπταρχία heptarchia, from ἑπτά hepta "seven", ἀρχή arche "reign, rule" and the suffix -ία -ia) alludes to the tradition that there were seven Anglo-Saxon kingdoms, usually enumerated as: East Anglia, Essex, Kent, Mercia, Northumbria, Sussex, and Wessex. The Anglo-Saxon kingdoms eventually unified into the Kingdom of England.
By convention, the Heptarchy lasted from the end of Roman rule in Britain in the 5th century, until most of the Anglo-Saxon kingdoms came under the overlordship of Egbert of Wessex in 829 (i.e., early in the 9th century). This approximately 400-year period of European history is often referred to as the Early Middle Ages or, more controversially, as the Dark Ages.
Although heptarchy suggests the existence of seven kingdoms, the term is just used as a label of convenience and does not imply the existence of a clear-cut or stable group of seven kingdoms. In fact, the number of kingdoms and sub-kingdoms fluctuated rapidly as kings contended for supremacy. In the late 6th century, the king of Kent was a prominent lord in the south; in the 7th century, the rulers of Northumbria and Wessex were powerful; in the 8th century, Mercia achieved hegemony over the other surviving kingdoms, particularly with "Offa the Great". Yet, as late as the reigns of Eadwig and Edgar (955–75), it was still possible to speak of separate kingdoms within the English population.
Alongside the seven kingdoms, a number of other political divisions also existed, such as the kingdoms (or sub-kingdoms) of: Bernicia and Deira within Northumbria; Lindsey in present-day Lincolnshire; the Hwicce in the southwest Midlands; the Magonsæte or Magonset, a sub-kingdom of Mercia in what is now Herefordshire; the Wihtwara, a Jutish kingdom on the Isle of Wight, originally as important as the Cantwara of Kent; the Middle Angles, a group of tribes based around modern Leicestershire, later conquered by the Mercians; the Hæstingas (around the town of Hastings in Sussex); and the Gewisse, a Saxon tribe in what is now southern Hampshire that later developed into the kingdom of Wessex.