The holy Prophet(SAW):The world will not come to an end until a man from my family (ahl al-bayt), who will be called al-Mahdi, emerges to rule upon my community.(Bihar al-anwar,V51,P75)

Historical perspective of Eid e Ghadir

Quran 5:67
“O Messenger! Make known that which hath been revealed unto thee from thy Lord, for if thou do it not, thou wilt not have conveyed His message. Allah will protect thee from mankind. Lo! Allah guideth not the disbelieving folk."
The Gathering of all the pilgrims
The Messenger of Allah, The Holy Prophet Muhammad (pbuh) suddenly stopped and froze on hearing the above 'Ayah' from The Archangel Jibraeel (as).
The holy Prophet looked at his cousin Ali (as) intently, who was riding next to him. He then quickly ordered the halt of the caravan in astonishment of all his companions and followers. To stop in such a place under the hot blazing midday sun, at such a desolate and arid place in the desert called Ghadir Khum.

The Holy Prophet (pbuh) listened patiently and confronted their complaints and pestering for halting them in such an un welcomed place. But The Holy Prophet (pbuh) would only calmly say, with a smile, that he was commanded by Allah (swt) to address the multitude of travelers, here and now, and it is not for him to question Allah (swt) for His choice of the time or place!
And what was he commanded to tell them by Allah (swt) they questioned impatiently. He would only say, that he was commanded to convey to them all, of what had been revealed to him now before the masses begin dispersing in all directions in the desert to their individual homes and destinations.
The Holy Prophet (pbuh) then quickly commanded one of his trusted faithful and close companions Hazrat Bilal (ra) to immediately cry out the Azaan so that the thousands of Muslim travelers could be gathered before him.

Make Shift Pulpit
The Prophet Muhammad (pbuh) then quickly ordered the clearing of the desert's dry prickly plants from the hot sandy ground, for the masses to stand before him. Then he ordered for some camel saddles to be piled up, so as to make shift a pulpit, upon a small elevated sandy mound, for the people to see him.
Then The Messenger of God (pbuh) waited patiently sweating under the hot burning sun for the straddles of people that were still behind and those that had gone further ahead to gather together, before him.
As soon as the multitude were gathered before him, the holy Apostle (pbuh) stood upon the make shift pulpit so that he was high enough to be seen by the entire congregation before him. The masses of crowd before him quickly quietened down, the sound of their questioning murmur soon died, as soon as they saw their Prophet (pbuh) standing high before them.
He then gestured to Imam Ali ibn-e-Abi Talib (as) and invited him to join him and stand on his right on the make shift pulpit. Each one of the masses of people was standing on his thin woolen cloak on the ground to protect his feet from the burning hot sands around him, which was baked by the blazing hot noon sun. They waited and watched in wonderment at the two before them, and again started to murmur to each other, each providing their own explanation of what was to come.
The Holy Prophet (pbuh) gestured with his hand and the murmur ceased and all the masses listened attentively as The Messenger of God (pbuh) slowly began his address.
He started first by praising and glorifying Allah Almighty (swt), The Creator of all the worlds and of the Heavens. He then proceeded to give them the sad news of his own nearing death saying,
I have been summoned, and it is the moment for me to answer, for the time has come for me, to depart from you. However I do leave behind me, amongst you, two weighty and precious things. And, if you cleave to them, you will surely never go astray! The Holy Book of God and, my Offspring the Ahl-ul-Bait. For they will never be separated from each other until they have led you to me, at the sacred shores of Heaven.
The masses of people who had gathered before him, now wept openly in sorrow at news of his nearing death. But who would lead and guide them? Who would take his place? What would become of them? What would become of Islam without him? They worriedly murmured to each other in puzzlement and panic?

The declaration of his Successor
When they all had quietened down the Prophet (pbuh) then called out at the top of his voice.
Am I not more appropriate to rule over you than yourselves?
The people replied in earnest,
By God! Yes you are!
The Holy Prophet Muhammad (pbuh) then continued by taking hold of both of Imam Ali's arms and raised them high above his shoulders, so much so that Imam Ali's sleeves slipped down his arms and rested on his shoulders.
The Prophet (pbuh) went on to proclaim Ali (as) as his successor and the legitimate Khalifa of Allah (swt).
Allah is my master and I am your master and whosoever, I am master of, Then this man, Ali is his master as well. O God! Befriend him, who so ever befriends him. Oppose him, whosoever opposes him. Support him, who so ever supports him. Desert him, whosoever deserts him.
This meant that through this revelation, Allah (swt) had asked the Prophet Muhammad (pbuh) to declare Imam Ali (as) as the Chosen Successor to the prophet.
After the pledge of allegiance ceremony had been completed, the Prophet (pbuh) looked above to the sky and wept then he raised a finger declaring in a loud clear voice for all to hear:
As God is my Judge! Bear witness then for me, that today I have surely completed and fulfilled your religion for you, and have successfully conveyed, The Message that has been bestowed upon me by Allah.....
Oh Muslims have I not!?
The Muslims all shouted repeatedly and replied in great earnest,
Yes You have, O Messenger of God! Yes you have.

The Oath of Allegiance
The Holy Prophet (pbuh) then immediately prayed two Rak'ats at the spot, so as to commemorate the historic occasion. And when he had finished his prayers, it was then time for the noon prayers and Hazrat Bilal (ra) once again cried the Azaan.
After The Prophet (pbuh) finished leading the noon prayers he then quickly called Imam Ali (as) to follow him into the tent that was pitched earlier under a lone tree. The Prophet (pbuh) then sat Imam Ali (as) down on one side and he himself sat opposite to him on the other side of the small tent. The Great Apostle of God (pbuh, then ordered all the Muslims and his Companions to each personally make an oath of allegiance to Imam Ali (as) in his very presence.
All the Muslims did so as he asked and formed a long queue and each of them gave his solemn 'Oath of Allegiance' with The Holy Prophet Muhammad (pbuh), standing by Imam Ali (as) and he accepted their congratulations, looking on as a personal witness to their testaments of the solemn occasion.
As for the accompanying womenfolk, a large bowl of water was placed in front of Imam Ali (as). A small makeshift screen was erected in front of him and then Imam Ali (as) passed his right hand under the screen and dipped his hand in the bowl, which lay immediately near the screen. Then the women were led in one by one, and each dipped her right hand in the bowl and gave her 'Oath of Allegiance' to Imam Ali (as), who sat behind the screen.

Imam Ali (as) is congratulated as the Caliph
As soon as the last Muslim had given his pledge of Allegiance the Prophet (pbuh) embraced Imam Ali (as) warmly and congratulated him on his appointment as the, Khalifatu Rasul Allah, meaning: The Vice regent for the Messenger of God over all the Muslims after his death.
The joyous crowds surrounding them were moved greatly at the sacred sight before them. They then all shouted their approval and wept with sheer happiness. But there were some who harbored envy and ill feelings in their hearts towards Imam Ali (as). While these persons gave their allegiance and openly congratulated Imam Ali (as) and The Prophet (pbuh) on the appointment of Imam Ali (as) as the Successor, these same persons would later deny this wonderful day and usurp the sacred Caliphate for themselves and cause the division of the whole Muslim nation!
But as for today The Holy Prophet Muhammad (pbuh) proudly praised Imam Ali (as) and officially named him,
Ameer-al-Momineen, meaning The Commander of the Faithful
Following The Prophet's (pbuh) example, rest of his companions followed suit. Amongst them most notably was, Umar ibn-e-Khattab, who joyfully said to Imam Ali (as) aloud,
Oh bravo, bravo Ali son of Abu Talib!
You have now become my Master and the Master of every believing Man and Woman!
Then the poets began composing their poetry commemorating this happy and wonderful occasion of the history of Islam.
The Holy Messenger of God (pbuh) who was accompanied by his son-in-law Imam Ali (as) at his side then commanded the huge masses of returning Pilgrims to begin their long travel north to their home city of Medina. Others bade their farewell to their Prophet (pbuh) and dispersed in small and large groups each in the direction of their homes.

This event and wording has been reported in the following books:
(1) Sahih Tirmizi.
(2) Sahih ibn-e-Maja.
(3) Kanz-al-Ammaal.
(4) Riyaz un-Nazra.
(5) Mustadrak as-Sahiyeen.
(6) Khasais-e-Nisaee.
(7) Masnad Ahmad ibn-e-Hambal.
(8) Tafseer-e-Kabeer
(9) Sawaiq-e-Moharraka.
(10) Al-Asaba.