Saint Margaret of Scotland, also known as Margaret of Wessex, was an English princess and a Scottish queen. Margaret was sometimes called "The Pearl of Scotland". Born in the Kingdom of Hungary to the expatriate English prince Edward the Exile, Margaret and her family returned to England in 1057. Following the death of king Harold II at the Battle of Hastings in 1066, her brother Edgar Ætheling was elected as King of England but never crowned. After she and her family fled north, Margaret married Malcolm III of Scotland by the end of 1070.
She was a very pious Christian, and among many charitable works she established a ferry across the Firth of Forth in Scotland for pilgrims travelling to St Andrews in Fife, which gave the towns of South Queensferry and North Queensferry their names. Margaret was the mother of three kings of Scotland, or four, if Edmund of Scotland is counted, and of a queen consort of England. According to the Vita S. Margaritae Reginae, attributed to Turgot of Durham, she died at Edinburgh Castle in Edinburgh, Scotland in 1093, merely days after receiving the news of her husband's death in battle.