Salman Farsi narrates that the Messenger of Allah (ص) said:
"I and Ali were in the form of a suspended light in the presence of the Almighty Allah. That light glorified and sanctified Allah, (1) four (ten) thousand years before He created Adam. When the Almighty and All-High Allah created Hazrat Adam, He placed that light in his loins, and we were constantly in one thing until we separated from each other at the rear of Abdul-Muttalib; one part of it became me and the other part became Ali. [I manifested in prophethood and Ali in the caliphate]” (2)
[1] Glorification means to say ‘Subhanallah’ and sanctification means to recognize the Allah without any defects and imperfections.
[2] Dailami, Firduas Al-Akhbar, V.3, page 332; Also, refer to Eini, Manaqib Seyedna Ali, page 21; Qunduzi, Yanabi al-Muwadda, V.2, page 307; Kharazmi, Al-Manaqib, page 145; Ibn Asaker, Tarikh Madinah-Damishq, V.42, page 67; Ganji Shafei, Kifayatu’t-Talib, page 315; Ibn Maghazli, Manaqib, page 93-94