Sahih Bukhari Volume 009, Book 093, Hadith Number 643.
Hadith Section/Book: Sahih Bukhari Sahih Bukhari Book 93. Oneness, Uniqueness of Allah (Tawheed)
Narrated By Abu Huraira : I heard Allah's Apostle saying, "Before Allah created the creations, He wrote a Book (wherein He has written): My Mercy has preceded my Anger." and that (Book) is written with Him over the Throne."