The Messenger of Allah ﷺ said, "When Allah completed the creation, He wrote in His Book, which is with Him above the Throne, 'My mercy has overcome My wrath.'"
قال رسول الله ﷺ: لما قضى الله الخلق، كتب في كتابه فهو عنده فوق العرش، إن رحمتي غلبت غضبي.
Bukhari reported it in the Book of the Beginning of Creation (3194), and Muslim in the Book of Repentance (2751), both from Qutayba bin Saeed, who said, "Mughira bin Abdul-Rahman Qurashi narrated to us, from Abu Zinad, from A'raj, from Abu Hurairah," and he related it.