The Messenger of Allah ﷺ said, "When Allah created creation, He wrote with His own hand concerning Himself, 'My mercy prevails over My wrath.'"
حدثنا قتيبة حدثنا الليث عن ابن عجلان عن أبيه
عن رسول الله ﷺ قال إن الله حين خلق الخلق كتب بيده على نفسه إن رحمتي تغلب غضبي
[Sahih]Its chain of transmission: Ibn Majah also narrated it in the Book of Zuhd, Chapter on What May Be Hoped For of Allah's Mercy on the Day of Resurrection, hadith no. 4295, from the hadith of Ibn Ajlan through this route. He explicitly stated that he heard it directly, as recorded by Ahmad, 2/433, and Ibn Hibban graded it sahih in Al-Ihsan, 6112.