Allah's Messenger (ﷺ) said, "When Allah completed the creation, He wrote in His Book which…

Sahih al-Bukhari Book 59 Hadith 5

Sahih al-Bukhari #3194

Beginning of Creation 59:5

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "When Allah completed the creation, He wrote in His Book which is with Him on His Throne, "My Mercy overpowers My Anger."

Chapter: The Statement of Allah Taa'la: "And He it is Who originates the creation; then will repeat it and this is easier for Him..."

Grade: Sahih