Imamate (Divinely Appointed Leadership) is a very high position, and it is only Allah who can decide who is qualified for it. And if the Prophet Muhammad (S) announced to the people that the Twelve Imams are the leaders, or that the Ahlul Bayt are the people that we must refer to, or in that Imam Ali is his successor, it was only because he was asked...
His Supplication for himself in Confessing Sins after Finishing the Night Prayer
...But then, he became the object of Divine trials - not for having committed any sin...
OGod, make our ways smooth to Thy pardon through Thy kindness and grant us sanct...
When Amir al-mu'minin was warned of being killed by deceit, he said: