So, the legend of Savitri comes to us from India. The oldest version we know of comes from the Vana Parva, or book of the forest.
It began with the childless king of Madra Kingdom, Ashwapati, who lived ascetically for many years and offered oblations to Sun God Savitr, along with his consort, Malavika. Finally, pleased by the prayers, the God Savitr appeared to him and granted him a boon: he would soon have a daughter. The king was overjoyed at the prospect of a child. She was born and named Savitri in honor of the god. Savitri was born out of devotion and asceticism, traits she would herself practice.
Young Savitri was so beautiful and so pure that she intimidated all the men around her, enough that none dared to ask for her hand in marriage. Worried that she may never marry, when she was old enough and no proposals had come, her father told Savitri that she may go out into the world and find a husband of her own choosing.
Savitri searched far and wide for a worthy suitor, and eventually came across a handsome young woodcutter named Satyavan. As it turned out, he was actually a prince by birth, but his father the king had become blind and was forced out of his kingdom, where they now resided in the forest in exile. Savitri was so touched by his honor, nobility and modesty that she declared him a worthy husband, and they agreed to marry.
Overjoyed with her seeming good fortune, she brought him and his family home to meet her father and have the local sage bless the marriage. There was just one problem. While in almost every way, Satyavan seemed like a perfect choice, he carried with him a dark fate, in that he was destined to die one year from his wedding day.
This, of course, was a bad thing, because tradition dictated that upon her husband's death, a wife must also join him on the funeral pyre. Not wanting his daughter to die so young from such an unfortunate fate, Ashwapati begged Savitri to choose someone--anyone--else. But, she refused. She loved Satyavan and would only choose a husband once. So, finally, Ashwapati agreed to allow the marriage, and the two were united and went to live in the forest.
For a whole year, they were very happy, living in bliss, devoted to the gods, and Savitri was a good and dedicated wife. But, as the fateful day drew near, Savitri took a vow of fasting and vigil. Her father-in-law said she didn't need to perform such harsh measures, but Savitri said she was oath-bound to perform these austerities, and won her father-in-law's support.
Finally, the dreaded fateful day came, and Savitri asked to accompany her husband into the woods. Seeing as she had never asked for anything really during the past year, her in-laws saw no reason to deny her request, and the two went off together. While chopping wood, Satyavan suddenly felt weak and dizzy and laid his head in Savitri's lap, and soon after died in her arms.
Servants of Yama, the god of death, came to claim Satyavan's soul, but Savitri quietly asked for more time. Awed by her purity and devotion, the servants left, empty-handed. Finally, Yama himself came to claim the young man's soul.
Unable to deny Death his due, Savitri let him take Satyavan's soul... but she got up to follow Yama through the woods on his way to the Underworld.
At first, Yama ignored her, figuring she would eventually give up. She didn't. She kept on behind him, following devotedly.
Finally, weirded out deeply by this young woman trying to re-enact It Follows, Yama stopped and asked her what she was doing. Savitri replied that she could not leave her husband, even in the arms of Death. She then praised Yama for his dutifulness, and obedience to Dharma and following the rules strictly, but still she followed him. Hoping to get her to go away, Yama offered to fulfill for her any wish she would like, except to bring her husband back to life. Savitri humbly asked for her father-in-law's sight to be restored. Yama agreed, thinking that was that.
He was wrong.
Yep, Savitri kept right on following at his heels. Even more creeped-out, Yama offered her a second wish, anything she could want. Savitri asked that her in-laws' fortune be returned to her father-in-law, and a hundred more children for her own father, that both kingdoms might be prosperous for generations, and again, Yama agreed, once again thinking that would be enough to get rid of her.
...he was still wrong.
Confused, dismayed and now thoroughly annoyed by Savitri's doggedness, Yama offered her one final wish, but warned her that, as they were near the gates of the Underworld now, she must take this wish and be satisfied and let him claim his due, or else he would take her soul as well. Savitri said she understood and Yama asked her what she wanted, and if there was anything she wanted for herself, since all her wishes so far had been for others.
But again, the caveat was that she could not ask for the life of her husband back.
Humbly, Savitri said that she wanted only to live a long life with many children and grandchildren. Yama agreed it was a good wish, and granted it.
And now, it was Savitri's turn to smile, as she reminded Yama that a widow could not remarry by the laws of the land.
Yama quickly realized her cleverness and that he had been tricked. After all, as she had no children, the only way to grant the wish was to restore Satyavan to life. Which he did, as his promise was law. Satyavan reawoke in the forest, and Savitri went to her husband's side, but not before Yama warned that he did not to expect to see either of them again for a very long time
And so, to the astonishment of all, they went home, no longer needing to live in the forest as exiles, and they were all happy and prosperous to the end of their days.