Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:74:31

And We have not made the keepers of the Fire except angels. And We have not made their number except as a trial for those who disbelieve - that those who were given the Scripture will be convinced and those who have believed will increase in faith and those who were given the Scripture and the believers will not doubt and that those in whose hearts is hypocrisy and the disbelievers will say, "What does Allah intend by this as an example?" Thus does Allah leave astray whom He wills and guides whom He wills. And none knows the soldiers of your Lord except Him. And mention of the Fire is not but a reminder to humanity.  

And We have appointed only angels as wardens of the Fire, in other words, and so they cannot be withstood as these ˹disbelievers are wont to˺ imagine; and We have made their number, so, only as a stumbling-block, a cause for error, for those who disbelieve, when they then say, ‘Why are there nineteen of them?’, so that those who were given the Scripture, namely, the Jews, may be certain, of the sincerity of the Prophet (s) in ˹saying that˺ they are nineteen, for this concords with what is in their Scripture; and that those who believe, from among the People of the Scripture, may increase in faith, in affirmation of the truth, given that what the Prophet (s) has said concords with what is in their Scripture, and that those given the Scripture and the believers, ˹those˺ other than these ˹Jews˺, may not be in doubt, concerning the number of ˹these˺ angels, and that those in whose hearts there is a sickness, an uncertainty, ˹those˺ in Medina, and the disbelievers, in Mecca, may say, ‘What did God mean by this, number ˹as a˺, similitude?’ (mathalan: they referred to it thus ˹as a mathal˺ on account of it being a curious matter; in terms of syntax, it ˹mathalan˺ is a circumstantial qualifier). Thus, that is, just as the one who rejects this number is led astray and the one who affirms the truth of it is guided, God leads astray whom He will and guides whom He will. And none knows the hosts of your Lord, namely, the angels, ˹none knows them˺ in terms of their strength and their assistants, except Him. And it, that is, Saqar, is nothing but a reminder for humans.
القرآن:٧٤:٣١

وَمَا جَعَلْنَا أَصْحَابَ النَّارِ إِلَّا مَلَائِكَةً ۙ وَمَا جَعَلْنَا عِدَّتَهُمْ إِلَّا فِتْنَةً لِلَّذِينَ كَفَرُوا لِيَسْتَيْقِنَ الَّذِينَ أُوتُوا الْكِتَابَ وَيَزْدَادَ الَّذِينَ آمَنُوا إِيمَانًا ۙ وَلَا يَرْتَابَ الَّذِينَ أُوتُوا الْكِتَابَ وَالْمُؤْمِنُونَ ۙ وَلِيَقُولَ الَّذِينَ فِي قُلُوبِهِمْ مَرَضٌ وَالْكَافِرُونَ مَاذَا أَرَادَ اللَّهُ بِهَٰذَا مَثَلًا ۚ كَذَٰلِكَ يُضِلُّ اللَّهُ مَنْ يَشَاءُ وَيَهْدِي مَنْ يَشَاءُ ۚ وَمَا يَعْلَمُ جُنُودَ رَبِّكَ إِلَّا هُوَ ۚ وَمَا هِيَ إِلَّا ذِكْرَىٰ لِلْبَشَرِ  

{وما جعلنا أصحاب النار إلا ملائكة} أي فلا يطاقون كما يتوهمون {وما جعلنا عدتهم} ذلك {إلا فتنة} ضلالا {للذين كفروا} بأن يقولوا لم كانوا تسعة عشر {ليستيقن} ليستبين {الذين أوتوا الكتاب} أي اليهود صدق النبي ﷺ في كونهم تسعة عشر الموافق لما في كتابهم {ويزداد الذين آمنوا} من أهل الكتاب {إيمانا} تصديقا لموافقته ما أتي به النبي ﷺ لما في كتابهم {ولا يرتاب الذين أُوتوا الكتاب والمؤمنون} من غيرهم في عدد الملائكة {وليقول الذين في قلوبهم مرض} شك بالمدينة {والكافرون} بمكة {ماذا أراد الله بهذا} العدد {مثلا} سموه لغرابته بذلك وأعرب حالا {كذلك} أي مثل إضلال منكر هذا العدد وهدى مصدقه {يضل الله من يشاء ويهدي من يشاء وما يعلم جنود ربك} أي الملائكة في قوتهم وأعوانهم {إلا هو وما هي} أي سقر {إلا ذكرى للبشر}.