 According to the "Life of Saint Margaret", attributed to Turgot of Durham, she died at Edinburgh Castle in 1093, just days after receiving the news of her husband's death in battle.In 1250 she was canonised by Pope Innocent IV.It was originally thought that St Margaret herself worshipped in this small chapel, but the style of the architecture indicates that it was built during the reign of David I, her fourth son, who ruled from 1124–1153.