The great abbey of Dunfermline was founded in the 11th century by Queen Margaret and the foundations of the original building lie under the stunning 12th century Romanesque style nave.The Abbey Church is the last resting place of many Scottish kings and queens.The adjoining church, at the front of Dunfermline Abbey and Palace, is not owned or operated by Historic Scotland. It is a functioning church where services are conducted.Dunfermline Abbey has a history stretching back to the 11th century – the time of King Malcolm III and Queen Margaret. In the 12th century, their son, David I, raised the little priory to the lofty status of abbey. He endowed it richly, and brought stonemasons from Durham Cathedral to help build it. The great nave still stands largely complete, the most visually stunning example of Romanesque architecture in Scotland.The abbey church is also famous as the mausoleum of some of Scotland’s great kings and queens. They include Queen Margaret (later canonised as St Margaret), David I and King Robert Bruce. As such, it occupies an especially important place in the national consciousness. Late on in its history, the abbey cloister became a royal palace. The ill-fated Charles I was born here, in 1600.