Abu Huraira told that he heard God's messenger say God most high had inscribed a document before bringing the creation into being, "My mercy has preceded my anger," and that it is written in His presence above the throne. (Bukhari and Muslim.)
Reported by Al-Bukhari (No. 7554). Cited in Mishkat al-Masabih (No. 5700).
وعن أبي هريرة، رضي الله عنه ، قال: قال رسول الله ، صلى الله عليه وسلم لما خلق الله الخلق، كتب في كتاب، فهو عنده فوق العرش: إن رحمتي تغلب غضبي". ((متفق عليه))