The Quran states that God commanded Prophet Moses (peace be upon him) to leave his people and retreat up a mountain for 30 days, which was later increased to 40. Before his departure, Prophet Moses appointed his brother Aaron as his successor - to take his seat as the representative of God.
A similar narrative can be found in the Bible. God commands Prophet Moses to appoint Aaron and his sons to minister as priests. Prophet Moses carries out an elaborate coronation to make Aaron's divinely appointed position official. This event bears an eerie resemblance to the event of Ghadir Khumm.
Source: ShiaBrain