16:126
وَإِنْ عَاقَبْتُمْ فَعَاقِبُوا۟ بِمِثْلِ مَا عُوقِبْتُم بِهِۦ ۖ وَلَئِن صَبَرْتُمْ لَهُوَ خَيْرٌ لِّلصَّـٰبِرِينَ
wa-in ʿāqabtum faʿāqibū bimith'li mā ʿūqib'tum bihi wala-in ṣabartum lahuwa khayrun lilṣṣābirīna
If you [believers] have to respond to an attack, make your response proportionate, but it is best to stand fast.
And if you punish (your enemy, O you believers in the Oneness of Allâh), then punish them with the like of that with which you were afflicted. But if you endure patiently, verily, it is better for As-Sâbirûn (the patient).