The Prophet ﷺ said, "I will keep interceding with my Lord, and He will keep granting me intercession, until I say, 'My Lord, grant me intercession for whoever said there is no god but Allah.'Then He will say, 'This is not for you, Muhammad. This belongs to Me alone. By My might, My forbearance, and My mercy, I will not leave in the Fire anyone,'" or He said, "'any servant who said there is no god but Allah.'"
عن النبي ﷺ قال: ما زلت أشفع إلى ربي ويشفعني حتى أقول: رب شفعني فيمن قال: لا إله إلا الله. قال: فيقول: ليست هذه لك يا محمد إنما هي لي، أما وعزتي وحلمي ورحمتي لا أدع في النار أحدا- أو قال: عبدا- قال: لا إله إلا الله.
No references are available.
Abu Yaala (2786) narrated it from Harun bin Abdullah, who said, Hammad bin Masada related to us, from Imran Ammi, from Hasan, from Anas, and he related it. Hasan here is Imam Basri, well known, but he was a mudallis and he explicitly stated that he heard it directly, as will be mentioned. Ibn Khuzayma also narrated it in Kitab Tawhid (581), and Ibn Abu Asim in Sunnah (828), both from the hadith of Hammad bin Masada, with his chain, similarly. Its chain is hasan due to the discussion surrounding Imran, who is Ibn Dawar, with a fatha on the waw followed by a ra, Qattan, Abu Awwam Ammi, though he narrates hasan hadith, and he has been corroborated.This is what the two sheikhs narrated, Bukhari (7510) and Muslim (193:326), both from the hadith of Hammad bin Zayd, who said, Mabad bin Hilal Anazi related to us, saying, "We set out to see Anas bin Malik." He then related the hadith at length as previously mentioned in the account of the Prophet's ﷺ intercession for the people gathered at the standing place. Near the end of the hadith it states, "So I will say, 'O Lord, permit me regarding whoever said, there is no god but Allah.' He will say, 'That is not for you, but by My might, My majesty, My greatness, and My sovereign power, I will surely bring out whoever said, there is no god but Allah.'"Ibn Khuzayma also referred to this in Kitab Tawhid (582), saying, "In the report of Hammad bin Zayd, from Mabad bin Hilal, from Anas," and he related the end of the hadith. He also narrated it in full elsewhere (604) through this same route, where it states, Mabad said, "We proceeded until, when we were on the outskirts of the graveyard, I said, 'What if we turned aside to visit Hasan,' who was in hiding at the house of Abu Khalifa. He said, so we went in to see him. We said, 'O Abu Saeed, we have come from your brother Abu Hamza,' and we related the hadith to him until we finished. He said, 'Did he tell you nothing but this?' We said, 'He added nothing beyond this.' Hasan then said, 'He related this to me twenty years ago. I do not know whether the old man forgot, or whether he disliked telling it to you for fear you would come to rely on it alone.'" He said, "So they said, 'O Abu Saeed, tell us.' He laughed and said, 'Man was created hasty. I only mentioned it because I intended to tell it to you just as he told it to you, twenty years ago.'"He then said, "Then I will stand a fourth time and praise Him with those praises, then I will fall down before Him in prostration." He said, "It will be said to me, 'Raise your head, and speak, you will be heard, ask, you will be given, intercede, your intercession will be accepted.'" He said, "So I will raise my head and say, 'O my Lord, permit me regarding whoever said, there is no god but Allah.'" He said, "It will be said, 'That is not for you, but by My might, My majesty, and My greatness, I will surely bring out from it whoever said, there is no god but Allah.'" End of quotation.In Sahih Muslim, Mabad said, "I bear witness regarding Hasan that he related this to us, saying that he heard it from Anas bin Malik. I think he said, twenty years earlier, and at that time he was in full possession of his faculties."This hadith does not mean that whoever merely utters "there is no god but Allah" with his tongue, without heartfelt conviction, will come out of the Fire. Ibn Khuzayma criticized those who claimed this, charging them with a lack of understanding of Allah's religion and its rulings, which stems from their ignorance of the reports of the Prophet ﷺ, both the abridged versions and the fully detailed ones. For someone who bears witness that there is no god but Allah, without also bearing witness that Allah has messengers, books, a Paradise, a Fire, a resurrection, and a reckoning, entering Paradise is a matter of much greater apprehension.He also said, "Since most people of our time do not understand this discipline, and cannot distinguish between an abridged report and a fully detailed one, they base their arguments on the abridged report while disregarding the fully detailed one. Sometimes the fully detailed report is simply hidden from them, so they argue from the abridged report, and they seek leadership before they have properly learned, having denied themselves the patience needed to pursue knowledge. They cannot bear to wait until they truly deserve leadership, so as to reach the ranks of the scholars." End of quotation. Kitab Tawhid (2/615).