Question: Why is the dog the most impure animal and the most loyal at the same time, while impurity is not suitable for loyalty?
Answer: In the Name of Allah, the Merciful, the Intensely Merciful,
All Praise be to Allah, Lord of the Worlds, and may Allah send Blessings upon Muhammad and the family of Muhammad, the Imams and the Mahdis.
When Allah created Adam (pbuh) he placed him in the Door of Paradise for forty years, and the Angels used to step over him before He blew into him the Spirit , in order that he may be humble within himself. So when Iblis (l.a) passed upon him, while he was with the Angels, he spit on him, and the spit of Iblis (l.a) fell upon the stomach of Adam (pbuh). So Allah Commanded the Angels to lift [remove] the mud upon which the spit of Iblis (l.a) had fallen, thus its place became similar to a hole, and it is the navel [belly button], and it is what is present now in the stomach of the human being. And Allah created from that mud , which had upon it the spit of Iblis (l.a), the dog.
Therefore, the dog is created from the mud of a Prophet, who is Adam (pbuh), and from the spit of Iblis (l.a), thus, it is the most impure animal because it was created from the spit of Iblis (l.a), while it is the most loyal animal because it was created from the mud of a Prophet. So gathered in the dog are the loyalty of the Prophets, and the impurity of the Shaitan Iblis (l.a), Glory be to The Gatherer between light and darkness, that is with regards to the self of the dog. As for its physical body, it was also created from the spit/saliva of Iblis (l.a), and from the mud after Adam descended to this Earth .
Vicegerent and Messenger of Imam Al Mahdi (pbuh)
13 of Rajab, 1426 Hijra
The Allegories, Question 182
 – Abu Ja’far said: ‘We found this in the Book of Amir ‘Al Mu’minin (pbuh), so Allah created Adam and he remained for forty years an image, and Iblis, the accursed, used to pass by him, so he would say: “you have been created for a certain purpose”, so the knowledgeable one (pbuh) said: So Iblis said: “Most certainly if Allah [ever] commands me to prostrate to this I shall disobey Him.” Then he (pbuh) said: Then [Allah] blew into him…’ [Tafsir Al Qumi: V. 1, P. 41]
 – And this mud is the [mud that] ascended which the Imam Ahmed Alhasan (pbuh) mentioned it in The Allegories, where he said: ‘Verily Adam (pbuh) was created from mud, meaning from this Earth. However, he did not remain on this Earth only, rather he ascended to the highest point of the worldly sky, meaning, the first sky, or say to the door of the second sky……. And this ascension of the mud of Adam requires that his (pbuh) mud be luminous/shine by the Light of his Lord and that it be pleasant.’ [The Allegories – volume 1/Answer to Question number (3), about the Prophet of Allah Adam (pbuh).
 – From Amir ‘Al Mu’minin (pbuh): ‘Verily the Prophet (pbuh & his family) was asked from what did Allah, Glorified and Exalted, create the dog? He (pbuh & his family) said: “He created it from the saliva/spit of Iblis.” He (the man who asked) said: “And how is that O Messenger of Allah?” He (pbuh & his family) said: “When Allah, Glorified and Exalted, sent down Adam and Eve to the Earth, He sent them down as two trembling birds, so Iblis, the accursed, turned to the lions, and they were in the Earth before Adam, so he said to them: “Verily two birds have fallen from the sky, no one [of those who see] has ever seen something greater than them, Come and eat them!” So the lions yowled with him and Iblis began to urge them and shout at them and promise them that the distance is near, So from him out of the hurry of his speech fell saliva/spit, so Allah, Glorified and Exalted, created from that saliva two dogs, one of them male, and the other female, so they rose around Adam and Eve, the female dog in Jeddah, and the male dog in India, thus they did not let the lions come near to them, and from that day the dog became the enemy of the lions and the lions the enemy of the dog.’ [Qisas Al Anabiya – Al Jaza’ A’ri (Stories of the Prophets): P. 57.]