The first degree of Abraham...
The first degree of Abraham, may the blessing of Allah be upon him, was becoming a servant of Allah (‘Abd), then he became Prophet (Nabi), then he became Messenger (Rasul), then he became a Confident (Khalil), and then he finally became Imam. The above verse of the Quran (2) proves that Allah assigns Imam, and the designation of Imam is not the business of people.
Below is the Sunni commentary of Yusuf Ali on the above verse: Kalimat, literally “words”, here used in the mystic sense of God’s Will or Decree or Purpose. This verse may be taken to be the sum of the verses following.
In everything Abraham fulfilled God’s wish: he purified God’s house; he built the sacred refuge of the Kabah; he submitted his will to God’s (referring to sacrifice of his son) He was promised the leadership of the world; he pleaded for his progeny, and his prayer was granted, with the limitation that if his progeny was false to God, God’s promise did not reach the people who proved themselves false. As we see, the Quran clearly justifies the Shi’ite point of view in this matter.
But again, since Prophet Abraham, , and few others were also Imams, such belief (i.e., Imamate higher than prophethood) does not undermine their position. Imam means a person who is appointed by God as a leader and as a guide (3) to whom obedience is due, and whom people should follow. Messengers are the warners and Imams are Guides (4) Imams are the Stars of Guidance (5). Muhammad (PBUH&HF) was a Prophet, a Messenger, and an Imam.
By His death, the door of prophethood and messengership was closed for ever. But the door of Imamate (leadership) remained open because he had successors (Caliphs; deputies). Successor means a person who succeeds the position of the previous one. It is the obvious that successors of did not share anything about his position of prophethood and messengership. What remained for them was Imamate (leadership). And the number of these Imams are twelve as the Prophet himself testified.
Also note that the Quran clearly says that Imam and Caliph are assigned by God and this designation has nothing to do with people. For more evidence in the assignment of Imam by Allah, see the following verses of the Quran (about David), (6) (about Abraham) (7), (about Adam),(8) and (about Aaron) (9).