The Imam is the leader and example "from whose intellectual power and insight...
The Imam is the leader and example "from whose intellectual power and insight, those traveling toward God benefit, whose conduct and mode of life they imitate, and to whose commands they submit." In a very large and comprehensive sense, Imamate includes both intellectual authority and political leadership.
"After the death of the Prophet, the Imam was entrusted with the guardianship of his accomplishments and the continuation of his leadership, in order to teach men the truths of the Quran and religion and ordinances concerning society; in short, he was to guide them in all dimensions of their existence..." "The true and veritable Imam is that exalted person, who combines in himself intellectual authority and political leadership." He is the one "who stands at the head of Islamic society, being enabled thereby both of convey to men the divine laws that exist in every sphere and to implement them; and who preserves the collective identity and the human dignity of the Muslims from decline and corruption." The community saw itself well organized under the leadership of the Prophet (PBUH) and when he was gone, it was due for someone to replace him in the same position and authority.
Imam Ali was the Imam from the day the closed his eyes as he appointed him rightfully. He continues the divine light of guidance, regardless whether he became a Khalifa or not. The imam is the person who has comprehensive leadership in religious as well as worldly matters as the successor of the Prophet." The Imam was therefore the universal authority entrusted divinely on both of the mentioned aspects.
Based on the succession of the Prophet, Imamate does not only reflect the spiritual guidance and leadership, it includes the social and political leadership also. Imamate is a position that combines the spiritual and religious leadership as well as the socio-political and worldly leadership. For the Shia, Ali is the first imam as well as the first Khalifa of the Prophet. Therefore, we cannot consider rationally that Ali is the first Imam but not the immediate successor of the Prophet.
The difference between Shia and Sunnis is not about the spiritual leadership; it is on the socio-political leadership immediately after the death of the Holy Prophet. God appointed as to be the leader of the community, a community being religious, as well as social and political. It was a civil and a moral community that God entrusted to him, so he had a comprehensive authority and leadership.