Here is the sixth part of the Introduction from the book titled 250 Year Old Human by Ayatullah Khamenei.
Introduction [Part 6]
Another important duty was the explanation of the issue of Imamat. Imamat meaning the governance of an Islamic society. A significant issue which was not clear for the Muslims in those days and had become practically and theoretically distorted was the issue of Imamat. The Imamat of the Islamic society is with whom? The situation had reached to the extent that someone who would not act upon the majority of Islamic rulings and would openly carry out forbidden acts, would claim that they are the successors of the Prophet (pbuh) and sat on the seat of the Prophet (pbuh) without feeling any shame. Meaning it was not even such that the people did not know, the people would see a person who was known as the caliph coming to the prayer hall drunk, and become the leader of the prayers and yet they would pray behind him. The people knew that Yazid, son of Muawiyah was drowned in huge ethical illnesses and was actively committing major sins. Even in this state when it was said to them to stand up against Yazid, they replied we have pledged our allegiance to him and we can not stand up against him. The issue of Imamat was unclear for the people. They did not think it was a big issue if the leader of the Muslims and the ruler of the Islamic nation was indulging in and stained with these sins, these prohibitions, these oppressions and those actions that were in conflict with [that which was in the] apparent of the Qur’an and Islam. This was a very big problem, especially if you look at the issue of governance over a society and the effects of the ruler on choosing the direction of the society, [this is] the most threatening danger for the Islamic world. Therefore, the Aa’ima (a.s) saw it necessary to explain two things to the people.
Firstly this that they say the Imam should fulfill specific conditions, the Islamic ruler should carry these traits; infallibility, god-fearingness, knowledge, spirituality, mannerisms with the people, [aware about] acts in front of Allah, specialties of the Imam meaning the explanantion of what is an Islamic ruler to the people. Secondly, the elucidation of who in this day and age is the person who fulfills all those necessities. They introduced and they showed themselves, this too was a big duty of the Aa’ima and you can see that this was one of the most important political duties [and one of the most] propagated and taught duties [of the Aa'ima].