Muhammad ibn Kaʿb, al-Ḥasan, Qatādah, and al-Ḍaḥḥāk explained “the darknesses” as the darkness of the fish, the darkness of the sea, and the darkness of the night.
Sālim ibn Abī l-Jaʿd added: “A second fish swallowed the first, so the darkness became that of two fish together with the darkness of the sea.”
As for the Almighty’s words:
“Had he not been among those who glorify (Allah),
he would surely have remained in its belly until the Day when all are raised.”
(Q 37:143–144)
It was said that the meaning is: were it not that he glorified Allah on that occasion—uttering declarations of divine oneness and praise, confessing his need, repenting and turning back to Him—he would have stayed there until the Day of Resurrection and would have been raised from the very belly of that fish. This is the sense of one of the two reports related from Saʿīd ibn Jubayr.
Another interpretation holds that the verse means: “Had he not already been, before the fish seized him, one of those who glorify Allah”—that is, of the obedient worshippers who pray and remember Allah abundantly. This was stated by al-Ḍaḥḥāk ibn Qays, Ibn ʿAbbās, Abū l-ʿĀliyah, Wahb ibn Munabbih, Saʿīd ibn Jubayr, al-Ḍaḥḥāk, al-Suddi, ʿAṭāʾ ibn al-Sāʾib, al-Ḥasan al-Baṣrī, Qatādah, and many others; Ibn Jarīr preferred this view.
Supporting it is the ḥadith recorded by Imām Aḥmad and several of the compilers of Sunan: from Ibn ʿAbbās, who said that the Messenger of Allah ﷺ told me,
“Young man, I shall teach you some words: Guard Allah and He will guard you; guard Allah and you will find Him before you; acquaint yourself with Allah in times of ease and He will know you in times of hardship.”
Ibn Jarīr, in his Tafsīr, and al-Bazzār, in his Musnad, transmit—through Muḥammad ibn Isḥāq, from one who related it to him, from ʿAbd Allāh ibn Rāfiʿ, the freedman of Umm Salamah—that Abu Hurayrah said: The Messenger of Allah ﷺ declared:
“When Allah willed to confine Jonah in the belly of the fish, He revealed to the fish: ‘Take him, but do not scratch his flesh and do not break a bone.’ When the fish reached the lowest depths of the sea, Jonah heard a sound and said to himself, ‘What is this?’ Allah revealed to him, while he was inside the fish, ‘That is the glorification of the creatures of the sea.’
“So he glorified Allah from within the fish, and the angels heard his glorification and said, ‘Our Lord, we hear a familiar voice coming from a strange place.’ He replied, ‘That is My servant Jonah; he disobeyed Me, so I have confined him in the belly of the fish in the sea.’
“They said, ‘Is this not the righteous servant whose good works rose up to You every day and night?’ He answered, ‘Indeed.’
“Whereupon they interceded for him; so Allah ordered the fish to cast him out upon the shore, as He says: ‘while he was sick.’”
This is Ibn Jarīr’s wording, both for the chain of transmission and for the text.