= Edinburgh =
The area around modern-day Edinburgh has been inhabited for thousands of years. Its origins as a settlement can be traced to the early Middle Ages when a hillfort was established in the area, most likely on the castle rock. From the seventh to the tenth centuries it was part of the Anglian Kingdom of Northumbria, becoming thereafter a royal residence of the Scottish kings. The town that developed next to the stronghold was established by royal charter in the early 12th century, and by the middle of the 14th century was being described as the capital of Scotland.
[c] Origins [c]
The earliest known human habitation in the Edinburgh area is from Cramond where evidence has been found of a Mesolithic site dated to c.8500 BC. Traces of later Bronze Age and Iron Age settlements have been found on the Castle Rock, Arthur's Seat, Craiglockhart Hill and the Pentland Hills. The culture of these early inhabitants bears similarities with the Celtic cultures of the Iron Age found at Hallstatt and La Tene in central Europe. When the Romans arrived in the Lothian area towards the end of the 1st century AD, they discovered a Celtic Brythonic tribe whose name they recorded as the Votadini. The Romans established a fort at Cramond, within what later grew to be Edinburgh, which they connected to York with the Roman Road known as Dere Street.
At some point before the 7th century AD, the Gododdin, presumed descendants of the Votadini, built a hillfort known as Din Eidyn or Etin, almost certainly somewhere within the bounds of modern Edinburgh. Although the exact location of the hillfort has not been identified, it seems more than likely they would have chosen the commanding position of the Castle Rock, or Arthur's Seat or the Calton Hill. During the time of the Gododdin, the territory of Lothian came into existence, with Edinburgh as its main stronghold. Around the year 600, Welsh tradition records that Mynyddog Mwynfawr, the Brythonic ruler of the kingdom of Gododdin, assembled a force within the vicinity of Edinburgh to oppose Germanic settlers to the south. This force was decisively defeated by the Angles at the Battle of Catraeth (probably at Catterick)
[c] Northumbrian Edinburgh (7th to 10th centuries) [c]
The Angles of the Kingdom of Bernicia had a significant influence on what would be successively Bernicia, Northumbria and finally south-east Scotland, notably from AD 638 when it appears that the Gododdin stronghold was besieged by forces loyal to King Oswald of Northumbria. Whether or not this battle marked the precise passing of control over the hillfort of Etin from the Brythonic Celts to the Northumbrians, it was around this time that the Edinburgh region came under Northumbrian rule. In the following years the Angles extended their influence west and north of Edinburgh but following their defeat at the Battle of Nechtansmere in AD 685 Edinburgh may have come to mark the north west extremity of the Angles' kingdom. Though not exclusive, Anglian influence predominated for the following three centuries with Edinburgh as a frontier stronghold. During this period Edinburgh became a place where the Northumbrian dialect of Old English was spoken and its name acquired the Old English suffix, "-burh".
While history records little about Northumbrian Edinburgh, the English chronicler Symeon of Durham, writing in c. 1130 and copying from earlier texts, mentioned a church at Edwinesburch in AD 854 which came under the authority of the Bishop of Lindisfarne. It has been inferred from this report that there was therefore an established settlement by the middle of the ninth century. It is possible that this church was a forerunner of what was later to become St Giles' Cathedral or St Cuthbert's Church. Traditionally and less certainly, Saint Cuthbert is said to have preached the gospel around the castle rock in the second half of the seventh century.
The development of a fortress on the Castle Rock is shrouded in uncertainty. It has been suggested that a stronghold was established by the Northumbrians in the seventh century, but the archaeological and historical evidence is scant, except for indications that by the end of Edinburgh's Northumbrian period (the middle of the 10th century) there was some form of noble residence on the site.
In the late ninth century the Danelaw, centred on York, was established in the wake of Viking raids on Britain. The northern part of Northumbria was cut off from the rest of England by the Old Norse-speaking Danes, significantly weakening what remained of the kingdom. During the tenth century its northernmost part, which had retained its Brythonic name Lothian, came under the sway of the Kingdom of Scotland. In 934 the Annals of Clonmacnoise record that the English king Æthelstan ravaged Scotland to Edinburgh but that he was forced to depart without any great victory. The 11th century Chronicle of the Kings of Alba records that "oppidum Eden", usually identified as Edinburgh, "was evacuated, and abandoned to the Scots until the present day." This has been read as indicating that Lothian was ceded to the Scottish king Indulf who reigned from AD 954 to 962. Thereafter Edinburgh generally remained under the jurisdiction of the Scots.
[c] Medieval burgh (11th century to 1560) [c]
In AD 973 the English king Edgar the Peaceful formally granted Lothian to Kenneth II, King of Scots. The historian Marjorie Anderson holds that this was the key event in assuring Scottish rule over Lothian. By the early 11th century the Scottish hold over the area was secured when Malcolm II ended the Northumbrian threat by his victory at the battle of Carham in 1018. While Malcolm Canmore (r.1058-1093) kept his court and residence at Dunfermline, north of the Forth, he began spending more time at Edinburgh where he built a chapel for his wife Margaret to carry out her devotions. St. Margaret's Chapel within Edinburgh Castle has been traditionally regarded as Edinburgh's oldest extant building, though most scholars now believe that in its surviving form it was more likely built by Margaret's youngest son David I in his mother's memory.
In the 12th century (c.1130), King David I, established the town of Edinburgh as one of Scotland's earliest royal burghs, protected by his royal fortress, on the slope below the castle rock. Merchants were allocated strips of land known as "tofts", ranged along both sides of a long market street, on condition that they built a house on their land within a year and a day. Each toft stretched back from the street to a perimeter dyke and formed a private close (from Old French clos), meaning an enclosed yard. A separate, contiguous burgh of regality held by the Abbey of Holyrood developed to the east as the burgh of Canongate.
Edinburgh was largely in English hands from 1291 to 1314 and from 1333 to 1341, during the Wars of Scottish Independence.
After the loss of Scotland's main trading port Berwick to English occupation in the 1330s, the bulk of the kingdom's profitable export trade in skins, hides, and most notably wool was routed through Edinburgh and its port of Leith. By the middle of the 14th century, in the reign of David II, the French chronicler Froissart described the town of around 400 dwellings  as "the Paris of Scotland" (c.1365 ). The Scottish king James II (1437-60) was "born, crowned, married and buried in the Abbey of Holyrood", and James III (1451–88) described Edinburgh in one of his charters as "the principal burgh of our kingdom" (principalior burgus regni nostri). By the reign of James V (1512–42) Edinburgh's assessment for taxation sometimes equalled the combined figures for the next three burghs in the kingdom; its proportion of total burgh taxation amounting to a fifth or a quarter and its total customs to a half or more. Despite wholesale destruction reported by contemporaries at the time of the Hertford Raid in 1544, the town slowly recovered with its population of merchant burgesses and craftsmen continuing to serve the needs of the royal court and nobility. Incorporated trades were cordiners (shoemakers), hatmakers, websters (weavers), hammermen (smiths and lorimers, i.e. leather workers), skinners, fleshers (butchers), coopers, wrights, masons, waulkers (fullers), tailors, barber-surgeons, baxters (bakers), and candlemakers. With the rise of taxes imposed by the burgh, some of these crafts relocated to suburbs beyond the town's boundary in the sixteenth and seventeenth centuries.
In 1560, at a time when Scotland's total population was an estimated one million people, Edinburgh's population reached 12,000, with another 4,000 in separate jurisdictions such as Canongate and the port of Leith. A parish census in 1592 recorded 8003 adults spread evenly south and north of the High Street; 45 per cent of the employed being domestic servants in the households of the legal and merchant professions or in town houses of the landed class Despite periodic outbreaks of plague with high death rates, most notably in 1568, 1584–88 and 1645, the population continued to grow steadily.
[https://en.wikipedia.org/wiki/History_of_Edinburgh, 2016-05-11]