The name Powys is thought to derive from Latin pagus 'the countryside' and pagenses 'dwellers in the countryside', also the origins of French "pays" and English "peasant". During the Roman Empire, this region was organised into a Roman province, with the capital at Viroconium Cornoviorum (modern Wroxeter), the fourth-largest Roman city in Britain. An entry in the Annales Cambriae concerning the death of King Cadell ap Brochfael says that the land later called Powys was originally known as Teyrnllwg.
Throughout the Early Middle Ages, Powys was ruled by the Gwerthrynion dynasty, a family claiming descent jointly from the marriage of Vortigern and Princess Sevira, the daughter of Magnus Maximus. Archaeological evidence has shown that, unusually for the post-Roman period, Viroconium Cornoviorum survived as an urban centre well into the 6th century and thus could have been the Powys capital. The Historia Brittonum, written around AD 828, records the town as Caer Guricon, one of his "28 British Towns" of Roman Britain. In the following centuries, the Powys eastern border was encroached upon by English settlers from the emerging Anglian territory of Mercia. This was a gradual process, and English control in the West Midlands was uncertain until the late 8th century.
In 549 the Plague of Justinian - an outbreak of a strain of bubonic plague - arrived in Britain, and Welsh communities were devastated, with villages and countryside alike depopulated. However, the English were less affected by this plague as they had far fewer trading contacts with the continent at this time. Faced with shrinking manpower and increasing Anglian encroachment, King Brochwel Ysgithrog may have moved the court from Caer Guricon to Pengwern, the exact site of which is unknown but may have been at Shrewsbury, traditionally associated with Pengwern, or the more defensible Din Gwrygon, the hill fort on The Wrekin.
In 616, the armies of Æthelfrith of Northumbria clashed with Powys. Seeing an opportunity to further drive a wedge between the North Welsh and those of Rheged, Æthelfrith invaded Powys' northern lands. Æthelfrith forced a battle near Chester and defeated Selyf and his allies. At the commencement of the battle, Bede tells us that the pagan Æthelfrith slaughtered 1200 monks from the important monastery of Bangor-on-Dee in Maelor because, he said, "they fight against us, because they oppose us by their prayers". Selyf ap Cynan was also killed in the battle and may have been the first of the kings of Powys to be buried at the church dedicated to St. Tysilio, at Meifod, thence known as the Eglwys Tysilio and subsequently the dynasty's Royal mausoleum.
If King Cynddylan of Pengwern hailed from the royal Powys dynasty, then forces from Powys may also have been present at the Battle of Maes Cogwy in 642. According to the probably ninth-century cycle of englyn-poems Canu Heledd, the region around Pengwern was sacked soon after, its royal family slaughtered and most of its lands were annexed by Mercia, some by Powys. However, this account is generally now thought to represent ninth-century imaginings of what must have been going on in the seventh, inspired by Powys's political situation in the ninth century.