A wicked man died and was brought before God for judgment. He asked to be allowed to return to life to repent. This was granted to him but he was worse than before. He was allowed to return for a third time but still continued in his wickedness. Once however, there were only nine men for prayer, and he joined and made the Minyan. He died and was brought before God together with a pious man. The latter was sentenced to one hour in Gehinom, and the wicked man was granted one hour in Paradise. But the wicked asked to be allowed to suffer in Gehinom that hour decreed for the pious. God, moved to mercy by this action, allowed both to enter and remain in Paradise.
The Wicked Man Who Earned Paradise in One Hour
Gaster, Exempla of the Rabbis No. 348