Wales in the early Middle Ages covers the time between the Roman departure from Wales c. 383 until the middle of the 11th century. In that time there was a gradual consolidation of power into increasingly hierarchical kingdoms. The end of the early Middle Ages was the time that the Welsh language transitioned from the Primitive Welsh spoken throughout the era into Old Welsh, and the time when the modern England–Wales border would take its near-final form, a line broadly followed by Offa's Dyke, a late eighth-century earthwork. Successful unification into something recognisable as a Welsh state would come in the next era under the descendants of Merfyn Frych.
Wales was rural throughout the era, characterised by small settlements called trefi. The local landscape was controlled by a local aristocracy and ruled by a warrior aristocrat. Control was exerted over a piece of land and, by extension, over the people who lived on that land. Many of the people were tenant peasants or slaves, answerable to the aristocrat who controlled the land on which they lived. There was no sense of a coherent tribe of people and everyone, from ruler down to slave, was defined in terms of his or her kindred family (the tud) and individual status (braint). Christianity had been introduced in the Roman era, and the Celtic Britons living in and near Wales were Christian throughout the era.
The semi-legendary founding of Gwynedd in the fifth century was followed by internecine warfare in Wales and with the kindred Brittonic kingdoms of northern England and southern Scotland (the Hen Ogledd) and structural and linguistic divergence from the southwestern peninsula British kingdom of Dumnonia known to the Welsh as Cernyw prior to its eventual absorption into Wessex. The seventh and eighth centuries were characterised by ongoing warfare by the northern and eastern Welsh kingdoms against the intruding Anglo-Saxon kingdoms of Northumbria and Mercia. That era of struggle saw the Welsh adopt their modern name for themselves, Cymry, meaning "fellow countrymen", and it also saw the demise of all but one of the kindred kingdoms of northern England and southern Scotland at the hands of then-ascendant Northumbria.
History
Wales as a nation was defined in opposition to later English settlement and incursions into the island of Great Britain. In the early middle ages, the people of Wales continued to think of themselves as Britons, the people of the whole island, but over the course of time one group of these Britons became isolated by the geography of the western peninsula, bounded by the sea and English neighbours. It was these English neighbours who named the land Wallia, and the people Welsh. The people of Wallia, medieval Wales, remained divided into separate kingdoms that fought with each other as much as they fought their English neighbours. Neither were the communities homogenously Welsh. Place name and archeological evidence point to Viking/Norse settlement in places such as Swansea, Fishguard and Anglesey, and Saxons settled amongst the Welsh in places such as Presteigne. It was the Norman invasion of England in 1066, which led soon after to incursions into Wales that overcame these rivalries, encouraging Welsh rulers to attempt to develop Wales into a unified state that could oppose this new threat. It was only in the final stages of conquest that Wales finally achieved this unity. It was the threat of invasion and conquest that created the nation of Wales.
After the Roman withdrawal, Wales remained a rural landscape, controlled by warlords that formed a local aristocracy. Control was exerted over a piece of land and, by extension, over the people who lived on that land. Many of the people were tenant peasants or slaves, answerable to the aristocrat who controlled the land on which they lived. There was no sense of a coherent tribe of people and everyone, from ruler down to slave, was defined in terms of his or her kindred family (the tud) and individual status (braint).