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

In the victory of Allah. He gives victory to whom He wills, and He is the Exalted in Might, the Merciful.  

in God’s help, to them against the Persians. They ˹the believers˺ indeed rejoiced in this, as they came to know of it on the day that it took place, on the day of ˹the battle of˺ Badr, when Gabriel came down with this ˹news˺ thereon, in addition to their rejoicing in their victory over the idolaters on that ˹same˺ day. He helps whomever He will; and He is the Mighty, the Victor, the Merciful, to believers.
القرآن:٣٠:٥

بِنَصْرِ اللَّهِ ۚ يَنْصُرُ مَنْ يَشَاءُ ۖ وَهُوَ الْعَزِيزُ الرَّحِيمُ  

{بنصر الله} إياهم على فارس وقد فرحوا بذلك وعلموا به يوم وقوعه أي يوم بدر بنزول جبريل بذلك مع فرحهم بنصرهم على قتل المشركين فيه {ينصر من يشاء وهو العزيز} الغالب {الرحيم} بالمؤمنين}.