Granddaughter of King Edmund Ironside of England and great-niece of St Stephen of Hungary. Margaret was born in Hungary, her family was in exile due to King Canute and the Danish invasion of England. She spent much of her youth in the British Isles. While fleeing the invading army of William the Conqueror in 1066, her family's ship foundered on the Scottish coast. They were assisted by King Malcolm III Canmore of Scotland, whom Margaret later married. They had eight children including St Maud, wife of Henry I, and St David of Scotland. Margaret founded abbeys and used her position to work for justice and improved conditions for the poor.
Queen Margaret was renowned for her good influence on her husband and also for her devout piety and religious observance. She was a prime mover in the reform of the Church in Scotland. Under Queen Margaret's leadership and, much to joy of the working-class, abstinence from servile work on a Sunday. Margaret founded churches, monasteries and pilgrimage hostels and established the Royal Mausoleum at Dunfermline Abbey with monks from Canterbury.