St Margaret's Chapel, in Edinburgh Castle, is the oldest surviving building in Edinburgh, Scotland. An example of Romanesque architecture, it is a category A listed building. It was constructed in the 12th century, but fell into disuse after the Reformation. In the 19th century the chapel was restored and today is cared for by the St Margaret's Chapel Guild.