2 Maccabees 12:45

But if he was looking to the splendid reward that is laid up for those who fall asleep in godliness, it was a holy and pious thought. Therefore he made atonement for the dead, so that they might be delivered from their sin.