2 Maccabees 12:44-46 New American Bible, Revised Edition (NABRE)

44. for if he were not expecting the fallen to rise again, it would have been superfluous and foolish to pray for the dead.

45. But if he did this with a view to the splendid reward that awaits those who had gone to rest in godliness, it was a holy and pious thought.

46. Thus he made atonement for the dead that they might be absolved from their sin.

2 Maccabees 12