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:40

So We took him and his soldiers and threw them into the sea. So see how was the end of the wrongdoers.  

So We seized him and his hosts, and flung them into the waters, the sea, and they drowned. So behold how was the sequel for the evildoers, when they ended up being destroyed.
القرآن:٢٨:٤٠

فَأَخَذْنَاهُ وَجُنُودَهُ فَنَبَذْنَاهُمْ فِي الْيَمِّ ۖ فَانْظُرْ كَيْفَ كَانَ عَاقِبَةُ الظَّالِمِينَ  

{فأخذناه وجنوده فنبذناهم} طرحناهم {في اليم} البحر المالح فغرقوا {فانظر كيف كان عاقبة الظالمين} حين صاروا إلى الهلاك.

See similar narrations below:

Collected by Qurʾān
quran:51:40

So We took him and his soldiers and cast them into the sea, and he was blameworthy.  

So We seized him and his hosts and cast, flung, them into the waters, the sea, and so they drowned, for he, that is, Pharaoh, was blameworthy, guilty of what is blameworthy, such as denying the messengers and claiming divinity.
القرآن:٥١:٤٠

فَأَخَذْنَاهُ وَجُنُودَهُ فَنَبَذْنَاهُمْ فِي الْيَمِّ وَهُوَ مُلِيمٌ  

{فأخذناه وجنوده فنبذناهم} طرحناهم {في اليم} البحر فغرقوا {وهو} أي فرعون {مُليم} آت بما يلام عليه من تكذيب الرسل ودعوى الربوبية.