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:3:160

If Allah should aid you, no one can overcome you; but if He should forsake you, who is there that can aid you after Him? And upon Allah let the believers rely.  

If God helps you, ˹if˺ He gives you assistance against your enemy, as on the Day of Badr, then none can overcome you; but if He forsakes you, ˹if˺ He refrains from assisting you, as on the Day of Uhud, then who is there who can help you after Him?, that is, after His forsaking ˹you˺? In other words, there is no one to help you. Therefore on God, and on no one else, let the believers rely.
القرآن:٣:١٦٠

إِنْ يَنْصُرْكُمُ اللَّهُ فَلَا غَالِبَ لَكُمْ ۖ وَإِنْ يَخْذُلْكُمْ فَمَنْ ذَا الَّذِي يَنْصُرُكُمْ مِنْ بَعْدِهِ ۗ وَعَلَى اللَّهِ فَلْيَتَوَكَّلِ الْمُؤْمِنُونَ  

{إن ينصركم الله} يُعنكم على عدوكم كيوم بدر {فلا غالب لكم وإن يخذلكم} يترك نصركم كيوم أُحد {فمن ذا الذي ينصركم من بعده} أي بعد خذلانه أي لا ناصر لكم {وعلى الله} لا غيره {فليتوكل} ليثق {المؤمنون}.