The Burgh of Edinburgh seems to have been established in the 1120s, but no surviving reference to the church of St Giles has been found before 1178. There was a consecration of the church in 1243. Then, during the 14th century the church suffered severe damage through attacks by Kings Edward II, Edward III and Richard II. However, a contract in 1387 stated that five new chapels were to be built. Thereafter, there is frequent mention of constructional changes to the church.