At a time when there was no permanent capital in the country - the 'capital' was wherever the king held his parliament - a remarkable number of royal acts were issued from Stirling.
King David 1 made Stirling one of the first royal burghs in Scotland, granting special favours which allowed it to develop into an important medieval trading town. This was partly to ensure a supply of local craftsmen and merchants for his own buildings within the castle - after all, the royal household required the constant provision of everything from candles and cooking pots to exotic foreign foodstuffs, fine cloth and wine. From then on, the merchants and craftsmen of Stirling continued to enjoy a close relationship with the royal family up at the castle, as they supplied its everyday needs.
The same king David also founded nearby Cambuskenneth Abbey, an Augustinian house similar to Holyrood Abbey which he also established close to his residence at Edinburgh Castle.
Clearly Stirling and Edinburgh were now emerging as the two most favoured royal residences in Scotland.