Devadahvagga

Suttapiṭaka · Majjhimanikāya · Vol. 14 · Section 25

[25] When his mind (citta) is thus concentrated (samādhi), purified, bright, unblemished, rid of corruptions (upakkilesa), malleable, wieldy, steady, and attained to imperturbability, he directs the mind to the knowledge (ñāṇa) of the passing away and reappearance of beings. With the divine eye (dibbacakkhu), purified and surpassing the human, he sees beings passing away and reappearing—inferior and superior, beautiful and ugly, fortunate and unfortunate—and he understands how beings fare according to their deeds (kamma): 'These worthy beings, alas, endowed with bodily misconduct, endowed with verbal misconduct, endowed with mental misconduct, revilers of the noble ones, holding wrong view, undertaking deeds based on wrong view—they, with the breaking up of the body, after death, have reappeared in a state of loss, a bad destination, the abyss, hell. But these worthy beings, endowed with bodily good conduct, endowed with verbal good conduct, endowed with mental good conduct, not revilers of the noble ones, holding right view, undertaking deeds based on right view—they, with the breaking up of the body, after death, have reappeared in a good destination, a heavenly world.' Thus with the divine eye, purified and surpassing the human, he sees beings passing away and reappearing—inferior and superior, beautiful and ugly, fortunate and unfortunate—and he understands how beings fare according to their deeds. In this way too, bhikkhus, exertion is fruitful, striving is fruitful.

English translation from the Pali (Siam Raṭṭha edition) — under review, not for citation.

This passage also appears in 2 other places