How did St Margaret get to Scotland?

She was married to a Scottish King, Malcolm the Third. She was part of the English royal family, and had returned to England from Denmark before she married King Malcolm. She was married to a Scottish King, Malcolm the Third. She was part of the English royal family, and had returned to England from Denmark before she married King Malcolm.