Sayyiduna Abdullah bin Ja'far (may Allah be pleased with him) narrates from Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) that he said: "The Messenger of Allah (peace and blessings be upon him) taught me these words and commanded me that if any distress or hardships befell me, I should say: 'There is none worthy of worship except Allah, the Most Generous, the Forbearing. Glory be to Him, and blessed is Allah, Lord of the Mighty Throne. And all praise is for Allah, Lord of the worlds.'"
Sayyiduna Abdullah bin Ja'far (may Allah be pleased with him) narrates from Sayyiduna Ali (may Allah be pleased with him) that he said: "The Messenger of Allah (peace and blessings be upon him) taught me these words and commanded me that if severe distress befell me, I should say them: 'There is none worthy of worship except Allah, the Forbearing, the Most Generous. Glory be to Him, and most blessed is Allah, Lord of the Mighty Throne. And all praise is for Allah, Lord of the worlds.'"
Imam Ahmad (may Allah have mercy on him) narrated it from Rawh bin Ubadah (may Allah have mercy on him).
Sayyiduna Abdullah bin Ja'far (may Allah be pleased with him) narrates from Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) that he said: "The Messenger of Allah (peace and blessings be upon him) taught me some words to say at the time of distress when it befalls me. I have not taught these words even to Hasan and Husayn (may Allah be pleased with them both); rather, I have singled you out with them. When some matter grieves you, say: 'There is none worthy of worship except Allah, the Forbearing, the Most Generous. Glory be to Him; most blessed is Allah, Lord of the Mighty Throne. All praise is for Allah, Lord of the worlds.'"
Sayyiduna Abdullah bin Ja'far (may Allah be pleased with him) said concerning these words: "There is no god worthy of worship but Allah, the Forbearing, the Generous; glory be to Allah, the Lord of the Mighty Throne; all praise is for Allah, the Lord of the worlds; O Allah, have mercy on me; O Allah, pass over my faults; O Allah, pardon me."
Sayyiduna Abdullah bin Ja'far (may Allah be pleased with him) said: "My uncle informed me that the Messenger of Allah (peace and blessings be upon him) taught him these words."
Imam al-Nasa'i (may Allah have mercy on him) narrated it in this way in his book 'Amal al-Yawm wa al-Laylah'.
He also narrated it through several routes, some of them marfu' (attributed to the Prophet) and some mawquf (stopping at the Companion).
He also narrated it in the 'Kitab al-Bu'uth' of his book and in 'Amal al-Yawm wa al-Laylah' through Qutaybah bin Sa'id (may Allah have mercy on him), Ya'qub bin Abd al-Rahman (may Allah have mercy on him) and Ibn Ajlan (may Allah have mercy on him).
Abu Hatim al-Busti (may Allah have mercy on him) narrated it from Isma'il bin Dawud bin Wardan al-Bazzar (may Allah have mercy on him), from Isa bin Hammad (may Allah have mercy on him).
Imam al-Daraqutni (may Allah have mercy on him) was asked about it, and he said: "Ibn Ajlan (may Allah have mercy on him), Usamah bin Zayd al-Laythi (may Allah have mercy on him) and Aban bin Salih (may Allah have mercy on him) narrated it, and they all agreed on narrating it as marfu' (attributed to the Prophet); however, Rib'i bin Hirash (may Allah have mercy on him) differed from them, for he narrated it from Abdullah bin Shaddad (may Allah have mercy on him), from Abdullah bin Ja'far (may Allah be pleased with him), from Sayyiduna Ali (may Allah be pleased with him) as mawquf (stopping at the Companion)."
I say: Mis'ar (may Allah have mercy on him) narrated it as marfu' from Abu Bakr bin Hafs (may Allah have mercy on him), from Abdullah bin Hasan (may Allah have mercy on him), from Abdullah bin Ja'far (may Allah be pleased with him).
Sayyiduna Abdullah bin Ja'far (may Allah be pleased with him) narrates from Sayyiduna Ali (may Allah be pleased with him) that he said: The Messenger of Allah (peace and blessings be upon him) said: "When I die, wash me with seven waterskins from my well, the well of Ghars."
Ibn Majah (may Allah have mercy on him) narrated it in this way.