Mohammad bin Abdillah bin Ubaidillah narrated from Mohammad bin Qassem, from Abbad bin Ya’qoub, from Amr bin Abi Al-Meqdam, from his father, from Saeed bin Jubair, from Ibn Abbas, who said:
The MESSENGER OF ALLAH (SWT) said:
I swear to ALLAH (SWT), who has sent me as a Warner and a Guide, that the Throne of ALLAH (SWT) did not settle, the universes did not start moving, and the heavens and the planets were not created until after ALLAH (SWT) wrote on them:
LA ILAHA ILLALLAH (SWT).
MOHAMMADUN RASULLULLAH.
ALIYUN WALIYULLAH.
Then the PROPHET (SAWW) explained what ALLAH (SWT) told him, in His own voice: ALLAH (SWT) said, “O MOHAMMAD (SAWW)”
I replied, “LABBAYK WA SAADAYK.”
ALLAH (SWT) said: I am Mahmoud and you are Mohammad. I derived your name from mine and I made you superior to all of My creatures. Assign your brother, ALI (ASWS) , to be a flag for My slaves to guide them to My religion.
O MOHAMMAD (SAWW)! I have made the believers the chosen ones, and I have made ALI (ASWS) their commander. Therefore, I curse those who give commands to ALI (ASWS) and I torture those who disobey him. But those who follow him, I will bring them closer to Me.
O MOHAMMAD (ASWS) ! I have made ALI (ASWS) the Imam of Muslims. Those who proclaim to precede him, I disgrace them. I imprison those who disobey him. I have made ALI (ASWS) the master of all of the successors, and I have made him the glorified leader of the believers. He is My decisive proof on My entire creation.
(Ref : Bihar Volume 27 Page No.8 Hadees No.26)