Sahih Bukhari | Volume 9 | Hadith Number 518

Narrated by Abu Huraira
The Prophet said, "When Allah had finished His creation, He wrote over his Throne: 'My Mercy preceded My Anger.'