The Messenger of Allah ﷺ commanded us to kill dogs, to the point that when a woman came in from the desert with her dog, we would kill it. Then the Prophet ﷺ forbade killing them and said, "You must kill the pure black dog with two spots, for it is a devil."
أمرنا رسول الله ﷺ بقتل الكلاب، حتى إن المرأة تقدم من البادية بكلبها، فنقتله، ثم نهي النبي ﷺ عن قتلها، وقال: عليكم بالأسود البهيم ذي النقطتين؛ فإنه شيطان.
Muslim narrated it in the Book of Musaqah (1572) via Rawh bin Ubada, who said, Ibn Jurayj told us, Abu Zubayr informed me that he heard Jabir bin Abdullah say what has been mentioned.His statement, "the one with the two dots," while in the copy of Al-Jam bayn al-Sahihayn (1644) by Humaydi it appears with the wording, "the one with the two stripes." The two stripes are the two lines on its back.