If it became necessary, Elijah was ready to do even the services of a sexton. When Rabbi Akiba died in prison, Elijah betook himself to the dead man's faithful disciple, Rabbi Joshua, and the two together went to the prison. There was none to forbid their entrance; a deep sleep had fallen upon the turnkeys and the prisoners alike. Elijah and Rabbi Joshua took the corpse with them, Elijah bearing it upon his shoulder.
Rabbi Joshua in astonishment demanded how he, a priest, dared defile himself upon a corpse. The answer was: "God forbid! the pious can never cause defilement." All night the two walked on with their burden. At break of day they found themselves near Caesarea.
A cave opened before their eyes, and within they saw a bed, a chair, a table, and a lamp. They deposited the corpse upon the bed, and left the cave, which closed up behind them. Only the light of the lamp, which had lit itself after they left, shone through the chinks. Whereupon Elijah said: "Hail, ye just, hail to you who devote yourselves to the study of the law.
Hail to you, ye God-fearing men, for your places are set aside, and kept, and guarded, in Paradise, for the time to come. Hail to thee, Rabbi Akiba, that thy lifeless body found lodgment for a night in a lovely spot."