Say, “Tell me: if Allah’s punishment were to befall you, or the Hour were to overtake you, would you call upon anyone other than Allah—if what you claim is true? No indeed; it is Him alone you would invoke. Then, if He so wills, He removes the hardship for which you called upon Him, and you forget all that you used to associate with Him.” (Al-Anʿām 6:40–41)
And He says: “We certainly sent messengers to nations before you; then We afflicted them with adversity and hardship so that they might humble themselves. Yet why, when Our punishment came upon them, did they not humble themselves? Instead, their hearts grew hard, and Satan made attractive to them what they had been doing.” (Al-Anʿām 6:42–43)
The Prophet—may Allah bless him and grant him peace—sought rain for his Companions both with a formal prayer and without one. He led them in the rain-seeking prayer, in the eclipse prayer, and during his regular prayers he would recite the qunūt, imploring Allah for victory over the polytheists. His rightly guided successors continued this practice after him, as did the imams of the religion and the elders of the Muslim community, and they have never ceased following this course.