Sayyiduna Zayd bin Khalid al-Juhani (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) led us in the morning prayer at al-Hudaybiyah, and it had also rained during the night. When he (peace and blessings be upon him) finished the prayer, he turned his face towards the people and said: "Do you know what your Lord says?" The Companions (may Allah be pleased with them) said: "Allah and His Messenger (peace and blessings be upon him) know best." The Messenger of Allah (peace and blessings be upon him) said: "Allah Almighty said: 'This morning some of My servants became believers and some disbelievers. Whoever said that it rained by the bounty of Allah and His mercy, he is a believer in Me and a denier of the stars; and whoever said that it rained because such-and-such a star came to such-and-such a position, he is a denier of Me and a believer in the stars.'"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3030