Surah Al-Baqarah, ayah 30

2:30

وَإِذۡ قَالَ رَبُّكَ لِلۡمَلَٰٓئِكَةِ إِنِّي جَاعِلٞ فِي ٱلۡأَرۡضِ خَلِيفَةٗۖ قَالُوٓاْ أَتَجۡعَلُ فِيهَا مَن يُفۡسِدُ فِيهَا وَيَسۡفِكُ ٱلدِّمَآءَ وَنَحۡنُ نُسَبِّحُ بِحَمۡدِكَ وَنُقَدِّسُ لَكَۖ قَالَ إِنِّيٓ أَعۡلَمُ مَا لَا تَعۡلَمُونَ ٣٠

Wa idh qāla rabbuka lil-malā'ikati innī jā'ilun fil-ardi khalīfatan qālū ataj'alu fīhā man yufsidu fīhā wayasfikud-dimā'a wanahnu nusabbihu bihamdika wanuqaddisu laka qāla innī a'lamu mā lā ta'lamūn

And [mention, O Muḥammad], when your Lord said to the angels, "Indeed, I will make upon the earth a successive authority."17 They said, "Will You place upon it one who causes corruption therein and sheds blood, while we exalt You with praise and declare Your perfection?"18 He [Allāh] said, "Indeed, I know that which you do not know."

Footnotes

17 Khalīfah: successor, or generations of man, one following another.

18 An additional meaning is "...and we purify ourselves for You."