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:17:5

So when the ˹time of˺ promise came for the first of them, We sent against you servants of Ours - those of great military might, and they probed ˹even˺ into the homes, and it was a promise fulfilled.  

So when the time for the first of the two ˹prophecies˺, the first of the two occasions for corruption, came, We roused against you servants of Ours of great might, men who are strong in war and assault, who ransacked, who came and went, seeking you out ˹through˺, ˹your˺ habitations, in the ˹very˺ midst of your homes, in order to slay you and take ˹others among˺ you captive, and it was a promise fulfilled. Their first act of corruption was their slaying of ˹the prophet˺ Zachariah. So Goliath and his army were roused against them, and they slew them and took their children captive and destroyed the Holy House ˹of Jerusalem˺.
القرآن:١٧:٥

فَإِذَا جَاءَ وَعْدُ أُولَاهُمَا بَعَثْنَا عَلَيْكُمْ عِبَادًا لَنَا أُولِي بَأْسٍ شَدِيدٍ فَجَاسُوا خِلَالَ الدِّيَارِ ۚ وَكَانَ وَعْدًا مَفْعُولًا  

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