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:42:41

And whoever avenges himself after having been wronged - those have not upon them any cause ˹for blame˺.  

And whoever defends himself after he has been wronged, that is to say, after the wrongdoer has wronged him — for such, there will be no course ˹of action˺ against them, no blame ˹on them˺.
القرآن:٤٢:٤١

وَلَمَنِ انْتَصَرَ بَعْدَ ظُلْمِهِ فَأُولَٰئِكَ مَا عَلَيْهِمْ مِنْ سَبِيلٍ  

{ولمن انتصر بعد ظلمه} أي ظلم الظالم إياه {فأولئك ما عليهم من سبيل} مؤاخذة.