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:16:59

He hides himself from the people because of the ill of which he has been informed. Should he keep it in humiliation or bury it in the ground? Unquestionably, evil is what they decide.  

He hides, disappearing, from people, that is, ˹from˺ his people, out of distress at the tidings given to him, fearing mockery, unsure what to do with it ˹the newborn˺: shall he retain it — refrain from killing it — in humiliation, ˹enduring˺ shame and disgrace, or trample into the dust, by burying it alive. Verily wretched is what they judge, ˹evil is˺ this judgement of theirs, in which they ascribe to their Creator ˹that His are the˺ daughters, who have such a ˹lowly˺ status in their eyes.
القرآن:١٦:٥٩

يَتَوَارَىٰ مِنَ الْقَوْمِ مِنْ سُوءِ مَا بُشِّرَ بِهِ ۚ أَيُمْسِكُهُ عَلَىٰ هُونٍ أَمْ يَدُسُّهُ فِي التُّرَابِ ۗ أَلَا سَاءَ مَا يَحْكُمُونَ  

{يتوارى} يختفي {من القوم} أي قومه {من سوء ما بشر به} خوفاً من التعيير متردداً فيما يفعل به {أيمسكه} يتركه بلا قتل {على هون} هوان وذل {أم يدسه في التراب} بأن يئده {ألا ساء} بئس {ما يحكمون} حكمهم هذا حيث نسبوا لخالقهم البنات اللاتي هن عندهم بهذا المحل.