One of the nicest stories to emerge from the Middle Ages comes from Pseudo-John Damascene in De his qui in fide dormierunt (PG 95: 264) who tells us that Pope Gregory the Great was so distressed that the pagan emperor Trajan had been consigned to hell, that he prayed to God to have a special exception made. God heard Gregory’s prayer, and Trajan was transferred upstairs.
However, the orthodoxy of this story was decidedly dodgy: souls should not be able to escape eternal punishment.
It says a lot for medieval theologians that, rather than dismiss this story as a credulous tale, they took the problem seriously.
In his Exposition on the Sacred Canon of the Mass (1484-1488) Gabriel Biel, speculated as to whether this was an example of the prayers for the dead obtaining forgiveness of sins for the souls in hell, or at least making their punishment easier (as Augustine had speculated they might).
Biel concludes that Pope Gregory’s intervention was a one-off, and this is how it happened:
This is how the story of Trajan can be addressed. The prayers of the blessed Gregory restored Trajan to life and to the ‘status viatoris’ [i.e. the transition from conception to one’s final end in heaven or hell]. Through this, Trajan obtained the remission of his sins, and as a result, freedom from punishment, as is the case for all those who were miraculously brought back to life, many of whom were idolaters, and thus damned [What? There were more than just Trajan?] It should likewise be said of all these that that they were not consigned to hell in any final way, according to the their just deserts at the time, but they were dealt with otherwise, in accordance with higher causes that foresaw them being restored to life. And thus Trajan was not damned by a definitive and irrevocable sentence, which alone can make a person damned. Some say that the soul of Trajan was simply freed by the absolute power of God, though when we are speaking of the common law, this cannot be said to help the souls of the damned. Others say [You mean there were other people discussing the Trajan test-case?] that the soul of Trajan was not simply freed from the punishment of hell, but that his punishment was suspended temporarily, until the day of judgement. Yet it should not be thought that these things are achieved through the prayers of the church for all people, for some things are dealt with under the common law, and other things are conceded to a particular individual as a privilege. Others say that he had been freed from punishment of the senses, but not from condemnation. But whatever is said, these two things remain consistent: firstly that the absolute power of God could make the damned blessed; secondly that, according to the common law, there is no redemption from hell, either in terms of the removal of punishment, or in terms of its diminution, and the sins that were committed during this life are not remitted.
Gabriel Biel, Sacri canonis missae expositio, edited by Heiko Oberman and William Courtenay, 4 vols. (Wiesbaden: Franz Steiner Verlag, 1963-1967), vol. 2, 388-389 (lectio 56U) [my translation]