Allah also recommended that His Prophet resort to acts of worship during times when he felt distressed because of the disbelievers who defied and denied him. Allah said,
[وَلَقَدْ نَعْلَمُ أَنَّكَ يَضِيقُ صَدْرُكَ بِمَا يَقُولُونَ - فَسَبِّحْ بِحَمْدِ رَبِّكَ وَكُنْ مِّنَ السَّـجِدِينَ - وَاعْبُدْ رَبَّكَ حَتَّى يَأْتِيَكَ الْيَقِينُ ](Indeed, We know that your breast is straitened at what they say. So glorify the praises of your Lord and be of those who prostrate themselves (to Him). And worship your Lord until there comes unto you the certainty (i.e. death)) (15:97-99).