حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ ، وَأَبُو خَيْثَمَةَ زُهَيْرُ بْنُ حَرْبٍ ، قَالَا : حَدَّثَنَا أَبُو مُعَاوِيَةَ ، عَنْ جَعْفَرِ بْنِ بُرْقَانَ ، عَنِ ابْنِ أَبِي نُشْبَةَ ، عَنْ أَنَسِ بْنِ مَالِكٍ ، قَالَ رَسُولُ اللهِ - صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ - : ثَلَاثٌ مِنْ أَصْلِ الْإِسْلَامِ : الْكَفُّ عَمَّنْ قَالَ : لَا إِلَهَ إِلَّا اللهُ ، لَا يُكَفِّرُهُ بِذَنْبٍ ، وَلَا يُخْرِجُهُ مِنَ الْإِسْلَامِ بِعَمَلٍ ، وَالْجِهَادُ مَاضٍ مُنْذُ بَعَثَنِي اللهُ إِلَى أَنْ يُقَاتِلَ آخِرُ أُمَّتِي الدَّجَّالَ لَا يُبْطِلُهُ جَوْرُ جَائِرٍ وَلَا عَدْلُ عَادِلٍ ، وَالْإِيمَانُ بِالْأَقْدَارِ كُلِّهَا .
It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Three things are the root and foundation of Islam: first, that one refrains from whoever says 'La ilaha illallah' (there is none worthy of worship except Allah); he is not to be declared a disbeliever on account of any sin, nor expelled from the fold of Islam on account of any deed. Second, that jihad continues from the time Allah Almighty sent me until the last of my Ummah fights the Dajjal; neither the tyranny of a tyrant nor the justice of a just one will invalidate it. And third, belief in all the decrees (of destiny)."
Related hadith on this topic