Grateful dead (folklore)

Grateful dead (or grateful ghost) is a folktale present in many cultures throughout the world.
Overview.
The most common story involves a traveler who encounters a corpse of someone who never received a proper burial, typically stemming from an unpaid debt. The traveler then either pays off the dead person's debt or pays for burial. The traveler is later rewarded or has their life saved by a person or animal who is actually the soul of the dead person; the grateful dead is a form of the donor.
The grateful dead spirit may take many different physical forms including that of a guardian angel, animal, or fellow traveler. The traveler's encounter with the deceased comes near the end of the traveler's journey.
Classification.
The "grateful dead" story is Aarne–Thompson–Uther type 505.
Folkloristic scholarship classify ATU types 505-508 under the umbrella term "The Grateful Dead", each subtype referring to a certain aspect of the legend:
In French academia, the archetype of the Grateful Dead is known as "Jean de Calais".
Variants.
In many cultures there is the belief that when a person dies their soul is separated from their body thus giving someone a proper burial allows their spirit to carry on into the next life.
An ancient Egyptian text explains the principle of reciprocity in which the deceased calls for a blessing on the person who remembers his name and helps him into a happy afterlife:
But if there be a man, any one whomsoever, who beholdeth this writing and causeth my soul and my name to become established among those who are blessed, let it be done for him likewise after his final arriving (at the end of life's voyage) in recompense for what was done by him for me, Osiris.
One variant of the motif is the Book of Tobit.
In medieval literature.
Stith Thompson pointed that the type AT 508, "The Bride Won in a Tournament", harks back to medieval chivalry literature. Ralph Steele Boggs listed occurrences of the ATU 505 in the Spanish literature of Late Middle Ages
The chivalric romance "Amadas" has the title knight pay his last coins for such a burial. Due to his chivalry the deceased is resurrected and aids the hero in recovering the riches that was used to provide him with a proper burial.
In folk and fairy tales.
The Grateful Dead motif also appears in various fairy tales as a type of Donor, such as the Italian "Fair Brow", the Swedish "The Bird 'Grip"'; H. C. Andersen's "The Traveling Companion" ("Reisekamaraten"), Danish folktale "Den hvide Mand og Kongesønnen" ("The white man and the king's son") or Norwegian "The Companion".
The English tale of "Jack the Giant Killer" contains the subtype AT 507, "The Monster's Bride".
Scholar George Stephens, in his edition of Medieval romance "Amadace", lists other occurrences of the grateful dead in tales from Europe and Asia, as introduction to the book.
In Irish fairy tale from Donegal, "The Snow, the Crow, and the Blood", a grateful dead, in the form of a short red man, helps a prince against three giants and exorcizes the devil's thrall on a princess.