Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) says that Sayyidah Maymunah (may Allah be pleased with her) narrated to me that one day the Messenger of Allah (peace and blessings be upon him) was in a state of grief in the morning. Sayyidah Maymunah (may Allah be pleased with her) said: "O Messenger of Allah! I have found you in an unfamiliar state today?" The Messenger of Allah (peace and blessings be upon him) said: "Jibril had promised me that he would meet me tonight; by Allah! he does not break his promise." Because of this the Messenger of Allah (peace and blessings be upon him) remained grieved. Then the thought came into the heart of him (peace and blessings be upon him) of a puppy that was under our tent. He (peace and blessings be upon him) gave the order and it was taken out; then he took water in his hand and sprinkled it over that place. In the evening Jibril (peace be upon him) met him (peace and blessings be upon him), and he (peace and blessings be upon him) said: "You had promised me that you would meet me last night!" He said: "Yes! But we do not enter a house in which there is a dog or an image." That day, in the morning, the Messenger of Allah (peace and blessings be upon him) ordered the killing of dogs, to the extent that he (peace and blessings be upon him) ordered even the dog of the small garden to be killed, and left the dog of the large garden.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 1150