Now, if any community remains adamant about their denial of a prophet, even after having had the divine message conveyed to them to the fullest possible extent, then God’s way is to ask the prophet to leave the town and thereafter the community is subjected to punishment (in the shape of some disaster).
The Prophets (Al-Anbiya’) 21:87–88