Surah Al-A'raf (الأعراف) · verse 164 (Meccan · Juz 9 · page 172)
وَإِذْ قَالَتْ أُمَّةٌ مِّنْهُمْ لِمَ تَعِظُونَ قَوْمًا ٱللَّهُ مُهْلِكُهُمْ أَوْ مُعَذِّبُهُمْ عَذَابًا شَدِيدًا قَالُوا۟ مَعْذِرَةً إِلَىٰ رَبِّكُمْ وَلَعَلَّهُمْ يَتَّقُونَ ﴿164﴾
التفسير الميسر
واذكر -أيها الرسول- إذ قالت جماعة منهم لجماعة أخرى كانت تعظ المعتدين في يوم السبت، وتنهاهم عن معصية الله فيه: لِمَ تعظون قومًا الله مهلكهم في الدنيا بمعصيتهم إياه أو معذبهم عذابا شديدًا في الآخرة؟ قال الذين كانوا ينهَوْنهم عن معصية الله: نَعِظهم وننهاهم لِنُعْذَر فيهم، ونؤدي فرض الله علينا في الأمر بالمعروف والنهي عن المنكر، ورجاء أن يتقوا الله، فيخافوه، ويتوبوا من معصيتهم ربهم وتعذِّيهم على ما حرَّم عليهم
Sahih International
And when a community among them said, "Why do you advise [or warn] a people whom Allah is [about] to destroy or to punish with a severe punishment?" they [the advisors] said, "To be absolved before your Lord and perhaps they may fear Him
Marmaduke Pickthall
And when a community among them said: Why preach ye to a folk whom Allah is about to destroy or punish with an awful doom, they said: In order to be free from guilt before your Lord, and that haply they may ward off (evil)
Abdullah Yusuf Ali
When some of them said: "Why do ye preach to a people whom Allah will destroy or visit with a terrible punishment?"- said the preachers:" To discharge our duty to your Lord, and perchance they may fear Him