A sword will pierce her soul, she is warned when Jesus is just a baby.
She will lose him and frantically search for him for three days when he’s a boy because he is about his father’s work in the temple.
She will think he has gone completely mad when he turns 30 and leaves home to start preaching and challenging powerful people.
She will suffer the agony of watching him die on a cross, nailed there by the powers that always do that to those who would oppose them.
Mary may not have had all this in mind when she composed her carol, and it is quite possible she sang this song again and again when it seemed like things were going horribly wrong for her son.
Then again, when she saw him alive three days after his death, her song would have meant even more!