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:28:4

Indeed, Pharaoh exalted himself in the land and made its people into factions, oppressing a sector among them, slaughtering their ˹newborn˺ sons and keeping their females alive. Indeed, he was of the corrupters.  

Truly Pharaoh had exalted himself in the land, the land of Egypt, and reduced its people into sects, groups, to serve him, oppressing a group of them, namely, the Children of Israel, slaughtering their sons, the newborn, and sparing their women, keeping them alive — for some of the ˹Egyptian˺ priests had told him, ‘A new-born of the Children of Israel shall bring about the end of your kingdom’. Indeed he was of those who cause corruption, through ˹the use of˺ slaughter and otherwise.
القرآن:٢٨:٤

إِنَّ فِرْعَوْنَ عَلَا فِي الْأَرْضِ وَجَعَلَ أَهْلَهَا شِيَعًا يَسْتَضْعِفُ طَائِفَةً مِنْهُمْ يُذَبِّحُ أَبْنَاءَهُمْ وَيَسْتَحْيِي نِسَاءَهُمْ ۚ إِنَّهُ كَانَ مِنَ الْمُفْسِدِينَ  

{إن فرعون علا} تعظم {في الأرض} أرض مصر {وجعل أهلها شيعاً} فرقاً في خدمته {يستضعف طائفة منهم} هم بنو إسرائيل {يذِّبح أبناءهم} المولودين {ويستحيي نساءَهم} يستبقيهن أحياء لقول بعض الكهنة له: إن مولوداً يولد في بني إسرائيل يكون سبب زوال ملكك {إنه كان من المفسدين} بالقتل وغيره.