The hadith of position is a Sahih hadith in Islamic traditions, in which Muhammad draws a parallel between himself and Musa and Ali to Haroun. It is one of the primary hadiths used by the Shia to justify Ali's right in the succession to Muhammad; Sunnis however, interpret it otherwise and do not consider Ali to be the successor, stating that Haroun did not succeed Musa.
The hadith and its context
are collections of the reports claiming to quote what the prophet Muhammad said verbatim on any matter. The term comes from the Arabic meaning "report", "account" or "narrative". Hadith are second only to the Quran in developing Islamic jurisprudence, and regarded as important tools for understanding the Quran and commentaries on it. The hadith literature is based on spoken reports that were in circulation in society after the death of Muhammad. Unlike the Quran itself, which was compiled under the official direction of the early Islamic State in Medina, the hadith reports were not compiled by a central authority. Hadith were evaluated and gathered into large collections during the 8th and 9th centuries, generations after the death of Muhammad, after the end of the era of the "rightful" Rashidun Caliphate, over 1000 km from where Muhammad lived. In 9 A.H., Muhammad received news of an imminent attack by the Roman Empire, so he left to fight the Battle of Tabuk. He did not want to leave Medina unguarded, since there were concerns regarding the safety of the city, and decided to leave Ali behind as his deputy. Ali asked if he was going to be left behind with the women and children. To this Muhammad replied: The tradition has been reported in various books with minor textual differences. It is reported that the words "and that you are the Caliph of every believer after me", were also said.
Shia view
The Shia also point out that this hadith nominated Ali as the successor of Muhammad. According to Makarem, if we considered with tradition neutrally we could understand that all positions belonged to Aaron on behalf of Moses then exactly the same judgment is established for Ali in comparison with Muhammad. However it is concluded that Ali thought of as the choice of Muslim after the death of the prophet as Aaron had such a position. Besides, Ali also was the minister, consultant, and near companion of Muhammad and a partner in his leadership. Finally, it has to mention that Ali was the successor of the prophet and no other person could take the place.
Sunni understanding of the hadith is that the comparison to Aaron was made, because Aaron was only a temporary leader until Moses returned. The exact same situation occurred when Ali was only a temporary leader until Muhammad returned to Madinah from Tabuk expedition. This view is shared by Sunni scholars such as Al-Qurtubi and Ibn Taymiyyah. However others like Abdul AzizDehlavi hold the view that Ali should be considered an Imam of his own time when he was appointed as the fourth Rashidun Caliph. Ibn Hajar al Asqalani holds another view and according to him the caliphate of Ali should have been limited to the life of the Islamic Prophet Muhammad.