Al-A'raf - 7:164

وَإِذَ قَالَتْ أُمَّةٌ مِّنْهُمْ لِمَ تَعِظُونَ قَوْمًا اللّهُ مُهْلِكُهُمْ أَوْ مُعَذِّبُهُمْ عَذَابًا شَدِيدًا قَالُواْ مَعْذِرَةً إِلَى رَبِّكُمْ وَلَعَلَّهُمْ يَتَّقُونَ
[7:164]
And when a party of them said: Why do you admonish a with a severe chastisement? They said: To be free from blame before your Lord, and that haply they may guard (against evil).
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."
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).