بويع بالخلافة في اليوم الذي قتل فيه عثمان واجتمع على بيعته أهل الحل والعقد من المهاجرين والأنصار وتزاحم الناس عليه وتخلف عن بيعته معاوية في أهل الشام والتحمت بينهما حروب لم يسمع بمثلها في الإسلام ولم يزل له فيها الظهور على الفئة الباغية إلى أن وقع التحكيم وخدع فيه وحينئذ خرجت الخوارج فكفروه وكفروا من معه وقالوا: حكمت الرجال في دين الله والله يقول: {إن الحكم إلا لله} ثم اجتمعوا وشقوا عصى المسلمين ونصبوا راية الخلاف فسفكوا الدماء فخرج إليهم بمن معه وطلبهم إلى الرجوع فأبوا إلا القتال فقاتلهم بالنهروان واستأصل جميعهم ولم ينج منهم إلا اليسير فانتدب إليه رجل من بقية الخوارج يقال له عبد الرحمن بن ملجم فدخل عليه فقتله في التاسع عشر من رمضان سنة أربعين وقصة استشهاده مشهورة فهو - رضي الله عنه - أحد العشرة المبشرين بالجنة وأحد ستة الشورى وأحد العلماء الربانيين والشجعان والزهاد والخطباء والشعراء، ومناقبه وما أوتيه من الاجتهاد والفهم معلوم. وكان صاحب شورى عمر في أقضيته وكذلك كان مع أبي بكر وعثمان وكان عمر يتعوذ بالله من معضلة ليس لها أبو الحسن وفي البخاري أحاديث سبعة في فضائله منها حديث عمر "على أقضانا" ومنها حديث قتاله البغاة "تقتل عمارا الفئة الباغية" وكان عمار مع علي ومنها حديث قتاله الخوارج وهذان الحديثان من علامات النبوة. قال الحافظ ابن حجر بعد نقله ما ذكر وأوعب من جمع مناقبه من الأحاديث الجياد النسائي في كتاب الخصائص وأما حديث "من كنت مولاه فعلي مولاه" فقد أخرجه الترمذي والنسائي وهو كثير الطرق جدا وقد روينا عن الإمام أحمد قال: ما بلغنا عن أحد من الصحابة ما بلغنا عن علي. ويروى من فضائله قوله عليه الصلاة والسلام: "أنا مدينة العلم وعلي بابها" قال مسروق: شافهت أصحاب محمد - صلى الله عليه وسلم - فوجدت علمهم ينتهي إلى ستة علي وعبد الله بن
He was given the oath of allegiance as caliph on the day ʿUthman was killed. The people of binding and loosing among the Emigrants and Ansar agreed on giving him allegiance, and the people crowded upon him. Muʿawiya, with the people of al-Sham, held back from his oath of allegiance, and between them wars broke out the like of which had not been heard of in Islam. He continued to have the upper hand in them over the rebellious party until the arbitration took place and he was deceived in it. Then the Kharijites rose up, declared him an unbeliever and declared those with him unbelievers, and said: You have made men judges in the religion of God, while God says: "Judgement belongs to God alone". Then they gathered, broke the staff of the Muslims, raised the banner of dissent and shed blood. So he went out against them with those who were with him and called on them to return, but they would have nothing but fighting; so he fought them at al-Nahrawan and exterminated them all, and only a few of them escaped. Then a man from the remnant of the Kharijites, called ʿAbd al-Rahman ibn Muljam, set himself against him, came in upon him and killed him on the nineteenth of Ramadan of the year forty; the story of his martyrdom is well known. He, God be pleased with him, is one of the ten who were given the glad tidings of Paradise, one of the six of the shura, and one of the lordly scholars, the brave, the ascetics, the orators and the poets; his virtues and the ijtihad and understanding he was given are well known. He was ʿUmar's counsellor in his judgements, and likewise he was with Abu Bakr and ʿUthman; ʿUmar used to seek refuge with God from a difficult problem for which there was no Abu l-Hasan. In al-Bukhari there are seven hadiths on his virtues, among them the hadith of ʿUmar, "ʿAli [?] is the best judge among us"; among them the hadith of his fighting the rebels, "The rebellious party will kill ʿAmmar", and ʿAmmar was with ʿAli; and among them the hadith of his fighting the Kharijites. These two hadiths are among the signs of prophethood. The hafiz Ibn Hajar said, after quoting what has been mentioned: The most comprehensive of those who collected his virtues from good hadiths is al-Nasaʾi in the book al-Khasaʾis. As for the hadith "Whoever I am the mawla of, ʿAli is his mawla", al-Tirmidhi and al-Nasaʾi transmitted it, and it has very many chains. We have related from the imam Ahmad that he said: There has not reached us about any of the Companions what has reached us about ʿAli. Among his virtues there is related his saying, upon him be blessing and peace: "I am the city of knowledge and ʿAli is its gate." Masruq said: I met the Companions of Muhammad, God bless him and grant him peace, face to face, and found that their knowledge ended with six: ʿAli, ʿAbd Allah ibn