Sahih Muslim, Book 1, Hadith 138 (Muslim 229)

It is reported on the authority of Abu Huraira that the Messenger of Allah (may peace and blessings be upon him) said:

Don't you know what your Lord said? He observed: I have never endowed My bondsmen with a favor, but a section amongst them disbelieved it and said: Stars, it was due to the stars.