بسم الله الرحمن الرحیم
Shia use a Hadith out of Context. The hadith is ‘whoever dies without recognizing his Imam, dies the death of ignorance”. By using this Hadith they try to prove their 12th Imam who is in hiding and they ask Sunnis that who is their Imam and that they will die the death of ignorance if they don’t recognize the Imam etc. However, we have refuted this silly claim of theirs numerous times. Check here and here.
Anyways, lets see who was the Imam of Ali (ra).
The Imam of Ali [ra] from his own sayings:
« اللّهمّ انّى اشهدك و كفى بك شهيدا انّى اشهد انّك انت ربّى وإنَّ رَسُولَكَ مُحَمَّدٌ – صلى الله عليه وسلم – نَبِيِّيْ؛ وإنَّ الدِّينَ الَّذِيْ شَرَعْتَ لَهُ دِيْنِيْ؛وَإنَّ الكِتابَ الذي أُنْزِلَ إلَيْهِ إمَامِيْ »
O Allah be witness and your witness is sufficient, O Allah I bear witness that you are my Lord and your apostle Muhammad (saw) is the Prophet and the religion that you gave him is my religion and the book that you revealed upon him, is my Imam.
صحيفه علويّه للمحلاتی ص360 چاپ تهران
مصباح المجتهد للطوسی ص300_بیروت؛
بحار الانوارج88 ص179