When the Son of man shall come in his glory, and all the holy angels with him, then shall he sit upon the throne of his glory: And before him shall be...
31When the Son of man shall come in his glory, and all the holy angels with him, then shall he sit upon the throne of his glory: 32And before him shall be gathered all nations: and he shall separate them one from another, as a shepherd divideth sheep from the goats: 33And he shall set the sheep on his right hand, but the goats on the left. 34Then shall the King say unto them on his right hand, Come, ye blessed of my Father, inherit the kingdom prepared for you from the foundation of the world: 35For I was an hungred, and ye gave me meat: I was thirsty, and ye gave me drink: I was a stranger, and ye took me in: 36Naked, and ye clothed me: I was sick, and ye visited me: I was in prison, and ye came unto me. 37Then shall the righteous answer him, saying, Lord, when saw we thee an hungred, and fed ? or thirsty, and gave drink? 38When saw we thee a stranger, and took in? or naked, and clothed ? 39Or when saw we thee sick, or in prison, and came unto thee? 40And the King shall answer and say unto them, Verily I say unto you, Inasmuch as ye have done unto one of the least of these my brethren, ye have done unto me. 41Then shall he say also unto them on the left hand, Depart from me, ye cursed, into everlasting fire, prepared for the devil and his angels: 42For I was an hungred, and ye gave me no meat: I was thirsty, and ye gave me no drink: 43I was a stranger, and ye took me not in: naked, and ye clothed me not: sick, and in prison, and ye visited me not. 44Then shall they also answer him, saying, Lord, when saw we thee an hungred, or athirst, or a stranger, or naked, or sick, or in prison, and did not minister unto thee? 45Then shall he answer them, saying, Verily I say unto you, Inasmuch as ye did not to one of the least of these, ye did not to me. 46And these shall go away into everlasting punishment: but the righteous into life eternal.
This is Jesus's most extended teaching on final judgment—and it subverts expectations. The criterion of judgment is not doctrine believed or rituals performed but treatment of 'the least of these.'
Both groups are surprised. The righteous didn't know they were serving Christ; they just fed the hungry and visited prisoners. The condemned didn't realize their neglect was rejection of Christ. The test is unconscious virtue, not calculated piety.