From the viewpoint of Shi'ah scholars khilafat (caliphate) is a Divine office which is entrusted to the most distinguished, the most appropriate and the wisest person of the ummah (nation). The most clear line of demarcation between a Prophet and an Imam (Prophet's successor) is that the Prophet lays the foundation of a religion, receives revelation and possesses a Book. However, as regards the Imam, though he does not possess any of these positions, yet, besides possessing the position of a ruler he is one, who explains and conveys that part of the Divine religion which could not be publicly narrated by the Prophet on account of lack of opportunity or because of the circumstances being unfavourable and, therefore, left it to his successors to tell them.
Hence from the Shi'ah point of view the caliph is not only a ruler of the time, a leader of Islam, the executive authority, the protector of the rights and the defender of the forts and frontiers of the country, but he is also one, who explains the knotty problems of the religion and completes that portion of the orders and laws which could not, for some reasons, be narrated by the founder of the religion.
According to the scholars of Ahl Sunnat, however, caliphate is a customary and secular office and the object of its creation is only to protect the worldly affairs and the material interests of the Muslims. According to them the caliph is selected, by making a reference to the public opinion, for the administration of political, judicial and economic matters. As regards disposal of religious matters including interpretation of laws, which were enacted during the time of the Prophet but could not be promulgated on account of various reasons, it is the concern of the scholars of Islam and it is for them to solve such difficult and knotty problems by means of Ijtihad.
On account of this difference in the views of the Muslims about the reality of caliphate two different wings appeared in them divided them into two groups This difference continues even at present.
According to the first view an Imam shares some attributes with the Prophet and is at par with him in that regard and the conditions, the fulfillment of which is considered necessary for the Prophet, are also necessary for the Imam. Here are the conditions which must be fulfilled by the Prophet as well as by the Imam:
1. The Prophet must be infallible viz. he should not commit any sin throughout his life and should not make any mistake while narrating the orders and realities of the religion or replying to the religious queries of the people. The Imam should also be like-wise and the argument in both the cases is the same.
2. The Prophet should be the wisest person in the matter of religious law and none of the points relating to religion should be hidden from him. And as the Imam is one who completes or narrates that portion of the religious law which was not narrated during the time of the Prophet of Allah, he (i.e. the Imam) too should be the most knowledgeable person with regard to the commands, and rules and regulations of religion.
3. Prophethood is a status which comes through nomination by Allah and not through selection by the people. A Prophet is introduced by Allah and is appointed to the office of prophethood by Him, because it is only He who can distinguish between an infallible and a fallible person and only He can understand as to who has attained such a position under the auspices of His blessing that he should be aware of all the details of the religion.
However, according to the second point of view (i.e. of the Sunnis), it is not necessary that any of the conditions for prophethood should be found in the Imam. It is not necessary that he should possess infallibility, righteousness, knowledge or conversance with religious law or should be nominated or should have relationship with the occult world.
It is sufficient that he should protect the glory and worldly interests of Islam by making use of his own intelligence as well as by consulting the Muslims and should ensure the security, of the area by enforcing penal laws and should endeavour to extend the territories of Islam under the call for jihad.
PROPHETHOOD AND IMAMATE
Besides the logical and philosophical arguments which finally prove the correctness of the first viewpoint the hadiths and the narrations which have come down from the Prophet of Islam also confirm the view of Shi'ah Ulema. During the period of his prophethood the Prophet specified his successor time and again and excluded the subject of Imamate (successorship) from the purview of selection or reference to the popular vote. He not only specified his successor during the last days of his life, but, even at the outset of his prophethood, when not more than two persons had embraced his religion, he introduced his successor to the people.
One day he was ordered by Allah to warn his near ones of Divine torture and to invite them to Islam before extending an invitation to the public. In a meeting in which forty-five elders of the family of Bani Hashim were present he said: "The first person amongst you who assists me will be my brother and successor". When Ali stood up and acknowledged his prophethood he turned to those present and said: "This young man is my brother and successor." This hadith is very well known amongst the exegetes and the traditionalists with the name of hadith Yaumud Dar and hadith Bid'ul Da'wah.
Not only at the commencement of his prophethood but on various other occasions also the Prophet made declarations about the mastership and the succession of Ali. However, none of these declarations equals the hadith of Ghadir in its greatness, clarity decisiveness and universality.
The ceremonies of Haj were over and the Muslims directly learnt the religious acts connected with Haj from the Prophet. The Prophet decided to leave Makkah for Madina. Orders for departure were given. When the caravan reached the region of Rabigh, which is situated at a distance of three miles from Juhfah, the Archangel Jibreel descended at a place called Ghadir Khum and communicated the following verse to the Prophet:
O Messenger! Convey what is revealed to you from your Lord, for if you do it not, it would be as though you have not conveyed His message. Allah will protect you from the people. (Surah al-Ma'ida, 5:67).
The tone of the verse shows that the Almighty Allah entrusted a very important task to the Prophet. And what task could be more important than that he should appoint Ali as his caliph and successor before the very eyes of hundreds of thousands of people. Hence orders were given to all the persons to halt. People who had gone forward ceased to move further and those who were left behind joined them. It was the noon time and the weather was very hot. The people covered their heads with a part of their cloaks and placed the other part under their feet. A shade was arranged for the Prophet by means of a cloak which was thrown on a tree. He offered the noon prayers in congregation. Thereafter, while the people were encircling him, he took his place on a platform which had been prepared with the saddles of the camels, and delivered the following sermon in a loud voice.
SERMON OF THE PROPHET AT GHADIR KHUM
All glory is specially for Allah. We seek His help and have faith in Him and rely upon Him. We seek refuge in Him from our evil doings and indecent deeds. He is the Lord besides whom there is no guide. There will be none to mislead one whom He guides. I testify that there is no god but Allah and Muhammad is His servant and His Messenger. Yes, O people! I may soon accept the Divine invitation and may depart from amongst you. I am responsible and you too are responsible. What is your opinion about me?" At this stage those present said loudly: "We testify that you have carried out your mission and made efforts in this behalf. My Allah reward you for this!"
The Prophet said: "Do you testify that the Lord of the World is one and Muhammad is His servant and His Messenger and that there is no doubt about life in the other world?" AII of them said: "lt's correct and we testify it".
Then the Prophet said: "O my followers! I am leaving behind two valuable assets as legacies to you and it is to be seen as to how you behave with these two legacies of mine".
At this moment a person stood up and said with a loud voice: "What do you mean by the two exquisite things? To this the Prophet replied; "One of them is the Book of Allah, one side of which is related to Allah and the other side is in your hands. And the other thing is my progeny and my Ahl al-Bayt. Allah has informed me that these too memorable things will not act separated from each other".
Yes, O people, Don't seek precedence over the Qur'an and over my progeny and do not be negligent in your behaviour towards them, lest you should be annihilated. At this moment he held the hand of Ali and raised it so high that the whiteness of the armpits of both of them became visible to the people. He introduced him (i.e. Ali) to all the people and then said: "Who enjoys more rights over the believers than themselves?" All of them said, "Allah and His Prophet know better". Then the Prophet said: "Allah is my maula (master) and I am the maula of the believers and I am more deserving and enjoy more rights over them than they themselves.
Yes, O people! Of whomsoever I am the maula this Ali is also his maula.
"O Allah! Love those, who love Ali and be inimical to those who are inimical towards Ali. O Allah! help Ali's friends; humiliate his enemies and make him the pivot of truth".
In the meanwhile the Archangel Jibreel came and brought this verse: This day I have perfected your religion for you and completed My favours to you, and have chosen for you the religion Islam (Surah al-Ma'idah, 5:3)
At this moment the Prophet pronounced Takbir loudly and then added: "I thank Allah for His having perfected His religion and for having completed His favour and for His having been pleased with the mastership and succession of Ali after me". Then the Prophet stepped down from the platform and said to Ali: "Sit in a tent so that the chiefs and distinguished personalities of Islam may shake hands with you and congratulate you".
The two shaykhs (Abu Bakr and Umar) congratulated Ali before all others and called him their maula.
Hassan bin Thabit, the renowned poet, after obtaining the Prophet's permission recited the following verses:
"He said to Ali: Stand up for I have selected you to succeed me and to guide the people after me".
"Of whomsoever I am the maula Ali is his maula. You love him sincerely and follow him".
THE AUTHENTIC SOURCES
Amongst all the traditions and Islamic narrations no other hadith (tradition) has been published and quoted as much as Hadith Ghadir. From out of the Ulema of Ahl Sunnat alone 353 have quoted it in their books and the number of authorities they rely upon reaches up to 110 companions. 26 great scholars of Islam have written independent books about the authorities and channels of this hadith. The famous historian of Islam, Abu Ja'far Tabari, has collected the authorities and channels of this hadith in two big volumes.
Throughout the passage of history this hadith has been the greatest authority about the precedence of Imam Ali over all other companions of the Prophet and Imam Ali, the Commander of the Faithful, himself argued on its basis in the consultative meeting which was held after the death of the Second Caliph as well as during the Caliphate of Uthman and his own Caliphate. Besides the Commander of the Faithful many other distinguished personalities amongst the Muslims have always relied on this hadith in reply to the opponents and deniers of the rights of Ali.
The event of Ghadir enjoys so much importance that, as quoted by numerous exegetes and traditionalists, verses of the Holy Qur'an have been revealed in connection with the event of that day.
 Tarikh-i Tabari, vol. II, page 216 and Tarikh-i Kamil, vol. II, page 410.
 Rabigh is a place situated between Makkah and Madina.
 It is one of the Miqats (i.e. places where ehram is put on). From here the paths of the people of Madina, Egypt and Iraq were separated.
 In order to make sure that no misunderstanding arose afterwards the Prophet repeated this sentence thrice.
 For further details refer al-Ghadir vol. I, by Allamah Amini.