The dog in Islam
Allah SWT included the dog in the blessings he endowed on the people of the cave
The dog in the people of the cave story in Quran is considered as one of the most important animals in Islam. In Tafsir Ibn Kathir, Ibn Jurayj described the dog Qitmir (the name of the dog قطمير means in Arabic, the name of a small membrane when the date is separated from its seed.) as lying outside the door on his stomach with his front legs stretched out. Qitmir guarded the People of the Cave and stood by them all through their long sleep, was also said to be either the hunting dog of one of the Companions of the Cave, which is the more accepted view, or the dog of the king’s chef, who accepted the ‘people of the cave’ Ashābul-Kahf's religious views, and brought Qitmir with him.
وَتَحْسَبُهُمْ أَيْقَاظًا وَهُمْ رُقُودٌ ۚ وَنُقَلِّبُهُمْ ذَاتَ الْيَمِينِ وَذَاتَ الشِّمَالِ ۖ وَكَلْبُهُم بَاسِطٌ ذِرَاعَيْهِ بِالْوَصِيدِ ۚ لَوِ اطَّلَعْتَ عَلَيْهِمْ لَوَلَّيْتَ مِنْهُمْ فِرَارًا وَلَمُلِئْتَ مِنْهُمْ رُعْبًا﴾
[ الكهف: 18]
And you would think them awake, while they were asleep. And We turned them to the right and to the left, while their dog stretched his forelegs at the entrance. If you had looked at them, you would have turned from them in flight and been filled by them with terror. Al Kahf: 18
Allah mentions this dog in the holy Quran, and says that he was stretching forth his two forelegs at the entrance to the CavE. Those people enjoyed a high status. This aya indicates the great benefit to be gained by keeping company with righteous people. Ibn Katheer (may Allah have mercy on him) said in his commentary on this aaya:
“Their dog was included in their blessing, so he slept as they slept in that situation. This is the benefit of keeping company with righteous people, so this dog was mentioned and was given status too.”

مالك حسام الدين