Edinburgh town walls There have been several town wall s around Edinburgh , Scotland , since the 12th century . Some form of wall probably existed from the foundation of the royal burgh in around 1125 , though the first building is recorded in the mid - 15th century , when the King ' s Wall was constructed . In the 16th century the more extensive Flodden Wall was erected , following the Scots ' defeat at the Battle of Flodden Field in 1513 . This was extended by the Telfer Wall in the early 17th century . The walls had a number of gates , known as ports , the most important being the Netherbow Port , which stood halfway down the Royal Mile . This gave access from the Canongate which was , at that time , a separate burgh . The walls never proved very successful as defensive structures , and were easily breached on more than one occasion . They served more as a means of controlling trade and taxing goods , and as a deterrent to smugglers . Throughout their history , the town walls of Edinburgh have served better in their role as a trade barrier than as a defensive one . By the mid 18th century , the walls had outlived both their defensive and trade purposes , and demolition of sections of the wall began . The Netherbow Port was pulled down in 1764 , and demolition continued into the 19th century . Today , a number of sections of the three successive walls survive , although none of the ports remain . Background . Edinburgh was formally established as a royal burgh by King David I of Scotland around 1125 . This gave the town the privilege of holding a market , and the ability to raise money by taxing goods coming into the burgh for sale . It is probable , therefore , that some form of boundary was constructed around this time , although it may have been a timber palisade or ditch , rather than a stone wall . To the north of Edinburgh lay the marshy Nor Loch , formed in the early 15th century in the depression where Princes Street Gardens are now laid out . This natural defence was augmented by the steep slope up to the northern edge of the Old Town . Edinburgh Castle , on its rocky outcrop , defended the western approach . Walls were therefore needed primarily on the south and east sides of the burgh . Early records mention a west gate in 1180 , a south gate in 1214 , and the Netherbow Port in 1369 . In 1362 the Wellhouse Tower was built beneath the north wall of the castle , protecting the castle ' s water supply , and defending the approach along the south shore of the Nor Loch . King ' s Wall . The King ' s Wall is first recorded in 1427 , in a title deed which refers to the wall as the property boundary . In 1450 , King James II issued a charter permitting the burgesses of Edinburgh to defend their town , as follows : In a further royal charter of 28 April 1472 , King James III ordered the demolition of houses built on or outside the King ' s Wall , which were hampering efforts to strengthen the defences . Edinburgh was thus one of only three Scottish towns to have medieval stone walls , the others being Stirling and Perth , though other towns had earth walls or palisades . The wall ran along the south side of the Royal Mile , above the Cowgate , from the slope of the Castle Hill in the west , almost as far as the modern St Mary ' s Street in the east , where it turned to cross the Royal Mile . In all , the King ' s Wall enclosed a space no larger than . The alignment of the wall was irregular , as existing property boundaries or walls were reinforced to form a defence . The early wall had two ports : the Upper Bow or Over - Bow , in the vicinity of what is now Victoria Street , and the Nether Bow , on the Royal Mile near Fountain Close , which was located near around further west than the later structure . In addition , postern s ( side gates ) were provided , for example at Gray ' s Close . Flodden Wall . In 1513 , King James IV led an invasion of northern England in support of the French and the Auld Alliance . On 9 September , the Scots met the English at the Battle of Flodden , and were heavily defeated , with King James killed on the field . An English invasion was widely expected , and in Edinburgh it was resolved to build a new town wall . However , the new wall was also an opportunity to control smuggling into the burgh , and the town council accordingly decided to extend the wall south to take in the Grassmarket and Cowgate areas of the burgh . Construction began the following year , but was not completed until 1560 . Work started at the western end , and the final section was the stretch from Leith Wynd to the Nor Loch , incorporating the New Port . The cost of this last work was £4 / 10s Scots per rood ( one rood = six ells or 5 . 6 metres ) for the wall , plus 40s per rood for the battlements . The Flodden Wall , as it became known , was generally around thick and up to high . The Flodden Wall began at the south side of the castle , running south across the west end of the Grassmarket , where the West Port was located , and continued uphill along the Vennel . A watch - tower or bastion survives at this , the south - west extent of the wall . It then ran east , wrapping around Greyfriars Kirkyard , to the Bristo Port and the Potterow Port , both located in the vicinity of the National Museum of Scotland . Continuing east , the wall passed the Kirk o ' Field , where the Old College now stands , and ran along Drummond Street , turning north at the Pleasance to enclose the former Blackfriars Monastery . The Cowgate Port was located at the foot of the Pleasance , and the wall then ran up the line of St Mary ' s Street , where it was formed by strengthening existing walls rather than new walling , to the Netherbow Port , which stood across the Royal Mile . The wall continued north to the Nor Loch , since replaced by Waverley railway station , terminating at the New Port . The Flodden Wall enclosed an area of just under , and remained the limit of the burgh until the 18th century . Contained within this area , in 1560 , was a population of around 10 , 000 . There were six ports in the Flodden Wall . Anti - clockwise from the castle they were : Besides , there were a number of small posterns . The heads and limbs of executed criminals were regularly displayed above the ports . Of the six ports , the Netherbow was the only one which took the form of a large fortified gateway . Repairs to the Netherbow are recorded in 1538 , and a drawing of 1544 shows the Netherbow as a wide arched gate flanked by two round towers . In 1571 , the gateway between the towers was rebuilt , and a central clock tower was added above the gateway , topped by an octagonal stone spire . This structure was repaired in the early 17th century . Military action . Although the expected English invasion never materialised after Flodden , the 16th century was a turbulent period in Scotland . In 1544 the Earl of Hertford led an English force into Scotland during the War of the Rough Wooing . On 6 May , having captured Leith , Hertford ' s men blew open the Netherbow Port with their artillery . The town was burned over the following three days , " so that neither within the walls nor in the suburbs was left any one house unburnt " . Further disturbances took place during the troubled reign of Mary , Queen of Scots ( 1542 – 1567 ) , and its aftermath . In 1558 the Protestant Lords of the Congregation marched on Edinburgh against the Catholic French Regent , Mary of Guise , and were able to take control of the town without difficulty , despite the guards posted at the city gate . Following the forced abdication of Queen Mary , Scotland ' s nobility was divided between her supporters , and those of the infant King James VI , represented by a series of regent s . Edinburgh was held for the Queen by William Kirkcaldy of Grange , and in May 1571 the town was besieged by the Regent ' s forces under James Douglas , 4th Earl of Morton . Repairs were made to the walls , and the Netherbow was barricaded . Nearby houses were pulled down to improve defences , and the siege gun Mons Meg was employed to batter houses outside the wall which were being used by snipers . Unable to make any headway , the besiegers withdrew on 20 May . Again the defences were strengthened in September , in advance of a second siege which began on 16 October . By this stage only ten per cent of Edinburgh ' s inhabitants remained in the city . The besiegers under Regent Mar had only seven guns , and while they did manage to breach the Flodden Wall , the inner defences were too strong for an assault . By 21 October the siege was once again lifted . A blockade of the town was continued until July 1572 when a truce was agreed . Grange retreated into the castle and handed over the town to the Regent ' s party . The siege of Edinburgh Castle continued until May 1573 , when it was finally reduced by a battery of guns shipped from England . Telfer Wall . In 1618 the town council bought of land to the west of Greyfriars Kirk , which was enclosed between 1628 and 1636 by the Telfer Wall . Most of this land was subsequently sold to the charitable George Heriot ' s Trust , and is now occupied by George Heriot ' s School . The rubble - built wall ran south from the Flodden Tower in the Vennel to Lauriston Place ; it then turned east , running as far as Bristo Street , where it returned north to the Bristo Port in the Flodden Wall . The Telfer Wall was named after its master mason , John Taillefer . Later history and demolition . By the 17th century the King ' s Wall had been almost completely absorbed within later buildings , although it is briefly mentioned in the " Extent Roll " , a town survey of 1635 , and limited sections appear on James Gordon of Rothiemay ' s map of 1647 . The mason John Mylne and the wright ( carpenter ) John Scott strengthened the Flodden and Telfer walls and constructed artillery emplacements in 1650 . Further emplacements were built by Captain Theodore Dury in 1715 , in response to the Jacobite rising of that year . In 1736 , the lynching of Captain John Porteous by an Edinburgh mob led the British Government in London to impose sanctions on the town . Porteous , Captain of the Town Guard , had been convicted of murder following the shooting of spectators at a public hanging , but following a reprieve , a mob broke into the Tolbooth Jail and executed him . The initial demand by the House of Lords was for the demolition of the Netherbow Port , although this was resisted by the town , and commuted to a fine by the House of Commons . When the town was threatened by the Jacobite rising of 1745 , a company of volunteer citizens was raised for the defence of the city , and the mathematics professor Colin Maclaurin advised on improvements to the walls . However , as Bonnie Prince Charlie ' s troops approached , the town was undermanned and the walls undefended . On the morning of 17 September , a group of Highlanders under Donald Cameron of Lochiel rushed the Netherbow Port as the gates were opened , and Edinburgh was captured without a fight . Demolitions began soon after the withdrawal of the Jacobite threat in 1746 . The bastions of the Telfer Wall along Lauriston Place were demolished in 1762 , as they were obstructing traffic . The Netherbow survived until 1764 , when it too was removed as an obstruction . The West Port and the Potterow Port were removed in the 1780s . By now , the New Town was under construction , and although smuggling of goods through the city walls was still being punished , complaints about the zealousness of the guards were widely circulated . The Old College of the University of Edinburgh ( constructed from 1789 ) , and then the Royal Museum of Scotland ( constructed from 1861 ) , were built over sections of the wall around the Potterow Port . Forrest Road was laid out in the 1840s , resulting in the loss of another section of the Telfer Wall . During construction works around the Advocates ' Library and Parliament House in 1832 and 1845 , fragments of walling were uncovered , which were attributed to the King ' s Wall . Two sections of the increasingly neglected town wall collapsed in the mid - 1850s . In 1854 , a large portion of wall ( 20 feet high and 3 – 4 feet thick ) , and the embankment against which it was built fell into Leith Wynd between the High Street and Calton Road . A week later the Dean of Guild ordered the removal of a 150 feet stretch of the wall from that location . In 1856 , a lightning strike appears to have been the cause of the collapse of a 40 to 50 feet stretch of the wall enclosing Greyfriars Kirkyard . Surviving fragments . Nothing remains of Edinburgh ' s earliest enclosures , and very little of the King ' s Wall survives , although parts are probably incorporated in later buildings . A section of walling in Tweeddale Court , on the south side of the Royal Mile , may represent part of the eastern wall . This was exposed , identified and recognised as a fortified wall , initially by two labourers working on the renovation and restoration of the old Oliver & Boyd publishers in 1983 . Subsequently this was confirmed by archaeologists and planners and it was not demolished as consented . The height ( ) , and lack of openings suggest a defensive purpose . Walling in Castle Wynd , north of the Grassmarket , has also been identified with the King ' s Wall . In 1973 , archaeological excavations on the site now occupied by the Radisson Hotel , south of the Royal Mile , uncovered a fragment of wall , which was thought likely to be the King ' s Wall . There was also evidence of a house adjacent , which had been demolished sometime in the 15th century , presumably in response to James III ' s order of 1472 . Four sections of the Flodden Wall survive : to the north and south of the Grassmarket ; in Greyfriars Kirkyard ; and along Drummond Street and the Pleasance . North of the Grassmarket the wall runs alongside Granny ' s Green Steps and has been incorporated into later buildings , including the former Greyfriars Mission Kirk . A line of granite paving across the Grassmarket marks the line of the wall where it was uncovered during construction work in 2008 . In the Vennel the last remaining bastion of the town walls survives . The Flodden Tower , as it is sometimes known , comprises two remaining walls with a total length of , pierced by crosslet gunloops and a 19th - century window . Sections of the Flodden Wall can be seen within Greyfriars Kirkyard , adorned with 16th and 17th century tombstones . At the junction of Forrest Road and Bristo Street a line of cobbles and a narrow gap in the later buildings mark the line of the wall . The longest section is in Drummond Street and the Pleasance , where it originally enclosed the Blackfriars Monastery . At the corner of the wall a blocked archway is probably the entrance to a demolished bastion . The site of the Netherbow is marked with an outline of brass blocks at the junction of the Royal Mile and St Mary ' s Street . There are two remaining sections of the Telfer Wall . The first runs along Heriot Place from the Flodden Tower , and forms the west boundary of George Heriot ' s School . The wall along Lauriston Place was demolished in 1762 , as the bastions were obstructing traffic . The only remaining section is that forming the south wall of Greyfriars Kirkyard . An inscription on the building at the corner of Teviot Place and Bristo Street reads " 1513 Site of Town Wall " , although it was the 17th - century Telfer Wall , not the earlier Flodden Wall , which stood on this spot . The majority of the surviving sections are listed buildings , while three sections are further protected as scheduled ancient monuments : the Flodden Wall at Granny ' s Green ; the Flodden and Telfer Walls at the Vennel and Heriot Place ; and the Flodden Wall at Drummond Place and Pleasance . The walls also form part of the Edinburgh Old Town World Heritage Site .