When this verse was revealed - “And warn your tribe (O Muhammad ﷺ) of near kindredʿ [ash-Shuʿaraʿ 26:214] - the Prophet ﷺ gathered his family together. Thirty people gathered and ate and drank. Then he said to them: ʿWho could take care of my debts and promises for me, and he will be with me in Paradise and will be my successor among my family?ʿ A man-Shareek did not name him – said: O Messenger of Allah ﷺ, you are like an ocean; who could do that? Then he offered that to the members of his family and ‘Ali ؓ said: I will.
لَمَّا نَزَلَتْ هَذِهِ الْآيَةُ {وَأَنْذِرْ عَشِيرَتَكَ الْأَقْرَبِينَ} [الشعراء 214] قَالَ جَمَعَ النَّبِيُّ ﷺ مِنْ أَهْلِ بَيْتِهِ فَاجْتَمَعَ ثَلاثُونَ فَأَكَلُوا وَشَرِبُوا قَالَ فَقَالَ لَهُمْ مَنْ يَضْمَنُ عَنِّي دَيْنِي وَمَوَاعِيدِي وَيَكُونُ مَعِي فِي الْجَنَّةِ وَيَكُونُ خَلِيفَتِي فِي أَهْلِي؟ فَقَالَ رَجُلٌ لَمْ يُسَمِّهِ شَرِيكٌ يَا رَسُولَ اللهِ أَنْتَ كُنْتَ بَحْرًا مَنْ يَقُومُ بِهَذَا؟ قَالَ ثُمَّ قَالَ لِآَخَرٍ قَالَ فَعَرَضَ ذَلِكَ عَلَى أَهْلِ بَيْتِهِ فَقَالَ عَلِيٌّ أَنَا