Sahih Muslim Book 1, Hadith Number 242.

Chapter : Pertaining to evil suggestion or prompting in faith and what should be said when it occurs to the mind of a man.

It is narrated on the authority of Abu Huraira that the Messenger of Allah (may peace be upon him) said: Men will continue to question one another till this is propounded: Allah created all things but who created Allah? He who found himself confronted with such a situation should say: I affirm my faith in Allah.