Eidyn was the region around modern Edinburgh in Britain's sub-Roman and early medieval periods, approximately the 5th-7th centuries. It centred on the stronghold of Din Eidyn, thought to have been at Castle Rock, now the site of Edinburgh Castle, and apparently included much of the area below the Firth of Forth. It was the most important district of the Brittonic kingdom of Gododdin, and a significant power in the Hen Ogledd, or Old North, the Brittonic-speaking area of what is now southern Scotland and northern England.
The site of Din Eidyn has been nearly continuously occupied since the Bronze Age, serving as a stronghold of the Votadini during the Roman era and later the principal centre of their successors, the Gododdin kingdom. Eidyn's importance to the Hen Ogledd is reflected in the popularity of the medieval poem Y Gododdin, which concerns a war band that gathered there for a raid around AD 600. After years of decline, Eidyn was conquered by the Angles in 638.
Eidyn left a considerable legacy. It is the source of the name of Edinburgh in both English and Scottish Gaelic. It also remained prominent in Brittonic tradition throughout the Middle Ages. Y Gododdin evidently circulated in multiple manuscripts into the 13th century. Eidyn also features in the Welsh Triads and poetry, where it was often remembered as the Britons' northern frontier. Welsh genealogies of the figure Clydno Eidyn may preserve Eidyn's royal pedigree.
Questions of Eidyn's name and location are closely linked, as it is not entirely clear what area the name refers to. It certainly included the fortress of Din Eidyn (a Brittonic name meaning the dun or hillfort of Eidyn) in modern Edinburgh. Place-name evidence suggests Eidyn spread more widely, surviving also in the name of Carriden (from Caer Eidyn), located eighteen miles to the west.Kenneth H. Jackson argued strongly that Eidyn referred exclusively to Din Eidyn, suggesting a different origin for Carriden. However, other scholars such as Ifor Williams and Nora K. Chadwick argued for the Caer Eidyn etymology and believed that Eidyn represented a wider region. Accepting the latter interpretation, Rachel Bromwich wrote that Eidyn would have covered much of the area south of the Firth of Forth, either abutting or possibly including the area known as Manaw Gododdin.
Eidyn is the source of the name of Edinburgh in both English and Scottish Gaelic. The Angles, who conquered the area in the 7th century, replaced the Brittonic din in Din Eidyn with the Old English burh to produce Edinburgh; similarly, the name became Dùn Èideann in Scottish Gaelic. The origin of the name Eidyn is not known. It may not have been known even in the 7th century, as both the Angles and Gaels adopted it into their languages more or less phonetically, even as they translated the term Din into their own languages. Some sources suggest it derives from an Old English form referring to Edwin of Northumbria, though modern scholarship refutes this, as the form Eidyn predates Edwin.Eidyn is evidently the original form of the name, though Eiddyn appears in later poetry.
Later Welsh sources also refer to Lleuddiniawn, the region now known as Lothian. Celtic scholar John T. Koch traces these names to the god Lugus, who was especially revered in this area. He argues that the original form was *Luguduniana ("Country of the Fort of [the god] Lugus"). This name implies the existence of a Lugudunon, or "Fort of Lugus", which Koch suggested was an alternate name or epithet of Din Eidyn.
Fortified communities appeared around Edinburgh in the Bronze Age and early Iron Age. During Britain's early Roman era, the area was recorded as part of the territory of the Votadini. The Votadini were largely independent but subject to Roman influence in the 2nd century. Around 143, Emperor Antoninus Pius commenced the Antonine Wall north of the Votadini and what would become Eidyn, with its eastern terminus likely at Carriden. The Votadini may have become a Roman client kingdom, tasked with defending the border against the Picts and Scots. The conception of Eidyn as Britain's northern border against the barbarians remained popular for hundreds of years.
In the post-Roman era, the Votadini polity transitioned into the Gododdin kingdom. Eidyn's importance to the Gododdin and the Hen Ogledd in general is attested in the early medieval poem Y Gododdin. The work relates that a force of 300 distinguished warriors from across the Brittonic world assembled at Din Eidyn for a raid on Catraeth (probably Catterick) around AD 600. The poem's dense language and convoluted history make it difficult to interpret the historical events underlying the work. According to Ifor Williams' interpretation, the warriors were summoned by Mynydawc Eidyn, perhaps a Gododdin ruler, to attack the Angles holding Catraeth. The warriors feasted for a year before setting out on the expedition, during which almost all were killed. Later scholars such as John Koch and Graham Isaac have challenged elements of this interpretation, and read Mynydawc as a place name referring to a mountain, not as a ruler. Koch suggested that the Eidyn ruler was Ureui or Gwylget Gododdin, who are mentioned in the text.
In the 7th century, the Gododdin kingdom was in decline. At this time, Eidyn may have been a sub-kingdom within Gododdin, and its lords may have controlled only their own territory, and not all of Gododdin. The Annals of Ulster record the "siege of Etin" in the year 638. This may refer to the final Anglian conquest of Lothian. This is also the earliest relatively certain historical reference to Eidyn. Eidyn appears to have remained in Anglian hands for most of the next three centuries, although historical and archaeological evidence is scant, and it is unclear if a fortress remained at Din Eidyn. The Annals of Clonmacnoise indicate that Aethelstan of England "spoiled the kingdom of Edinburgh" in 934, suggesting a fortification of some note existed at that time. The Chronicle of the Kings of Alba says that the Scots conquered Eidyn and its fort under King Indulf, who ruled from 954-962. Around this time a noble estate was built there, paving the way for the royal castle in the 11th century.
Eidyn's most significant location was the stronghold of Din Eidyn. The initial Iron Age settlement at Din Eidyn was presumably a dun or hill fort. Remains of such structures exist at Arthur's Seat and at Castle Rock (now the site of Edinburgh Castle), and some other hilltops in the area. Among these, archaeologists generally identify the Castle Rock site as Din Eidyn, as the evidence indicates it was an important centre continuously from Roman times into the Middle Ages.
Archaeological evidence suggests Castle Rock has been inhabited since the Bronze Age, possibly making it the oldest site in Scotland that has been nearly continuously occupied. However, the earliest evidence suggests the site was initially minor compared to other contemporary locations. During the Iron Age, the site was apparently a fortified village, though only one of several in the Edinburgh region. Its easily defended location appears to have given it an advantage over other nearby sites such as Arthur's Seat, where settlement was evidently unstable and not continuous. In the Roman era, the site supported a prosperous settlement that likely included a hillfort, perhaps featuring a broch (roundhouse). In this period, Castle Rock was apparently one of the major centres of the Votadini, though it was dwarfed by Traprain Law, which was ten times larger.
In the early medieval period, Din Eidyn emerged as the principal political centre of the Gododdin kingdom, especially after the abandonment of Traprain Law in the early 5th century. In the 7th century, when the Gododdin kingdom was in decline, the lords of Din Eidyn may have only controlled only the Eidyn district rather than the entire Gododdin territory. Following the Anglian conquest of Eidyn, the Din Eidyn location remained a fortified settlement of the Angles, and later of the Scots.
Eidyn remained prominent in Brittonic tradition long after its conquest by the Angles. Several works invoke Eidyn's position as the northern frontier of the Britons. The poem Pa gur yv y porthaur? (What man is the gatekeeper?), dating to the 10th century or earlier, contains several allusions to King Arthur and his warriors defending "Eidyn at the border". The poem describes Arthur's company fighting cinbin (dogheads) on the "Mountain of Eidyn". It also mentions Bedwyr (the Sir Bedivere of later tradition) sparring with Garwlwyd ("Rough-Grey"), evidently one of the monsters, at the "shores of Tryfrwyd". Similarly, Welsh Triad 33 includes a certain Llawgat Trwm Bargod Eidyn (Heavy Battle-Hand of the Border of Eidyn), who killed Afaon, son of Taliesin, in one of the "Three Unfortunate Slaughters of the Island of Britain".
Y Gododdin and its account of Eidyn apparently circulated in multiple manuscripts during the Middle Ages. The only existing version is in the 13th-century Book of Aneirin, but textual evidence suggests the scribes copied from two or three earlier manuscripts. Additionally, figures associated with Eidyn, including Clyddno Eidyn and his son Cynon ap Clydno - a survivor of Catraeth - featured in poetry, the Welsh Triads, and Arthurian material throughout the Middle Ages. A pedigree of Clyddno's family recorded in the Harleian genealogies and the Bonedd Gw?r y Gogledd may record Eidyn's kingly line.