Bela IV, King of Hungary, seeing that he was in danger of being driven from his kingdom by the Tartars who had invaded it, made a vow to God in concert with Mary, his wife, that if He would be pleased to deliver him from his enemies, he would dedicate for ever to His holy service the child that was soon to be born to him. His prayer was heard, and his vow accepted, for the Tartars left the kingdom as suddenly as they had entered it.
Not long after this event the Queen gave birth to a daughter, who was called Margaret. Faithful to their vow, her parents, when she was three years old, took her to the Dominican convent of Veszprim, and placed her under the care of the Countess Olympiada, who herself took the religious habit, that she might the more easily watch over her little charge. The child, thus given to God in her infancy, daily grew up in wisdom and grace, and her life was a series of wonders from beginning to end.
The Catechism In Examples Vol. III By the Rev. D. Chisholm Pg. 136-137.
Short Stories on Honor, Chivalry, and the World of Nobility—no. 482