Wales in the early Middle Ages covers the time between the Roman departure from Wales c. 383 and the rise of
Merfyn Frych to the throne of
Gwynedd c. 825. 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
Anglo-Welsh 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 Vrych.