Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) said: I went to the Prophet (peace and blessings be upon him) at midday, and Abu al-Hasan (Ali, may Allah be pleased with him) came. The Prophet (peace and blessings be upon him) said to him: "Come close to me, O Abu al-Hasan." He (peace and blessings be upon him) kept drawing him closer until he (peace and blessings be upon him) put his mouth to his ear (and began whispering), until the Messenger of Allah (peace and blessings be upon him) raised his head as though alarmed, and said: "This wicked one has knocked on the door with his ear." Then he said: "Go, O Abu al-Hasan, and lead him here the way a goat is led to the one who milks it." Then I saw Ali (may Allah be pleased with him) bringing al-Hakam, holding him by his ear and his jaw together, until he made him stand before the Prophet (peace and blessings be upon him). The Prophet (peace and blessings be upon him) cursed him three times. Then the Prophet (peace and blessings be upon him) said to Ali (may Allah be pleased with him): "Sit to one side." Then people from the Muhajirun and the Ansar came to the Prophet (peace and blessings be upon him), and the Prophet (peace and blessings be upon him) called for him again and said: "Take note! This man will oppose the Book of Allah and the Sunnah of His Prophet (peace and blessings be upon him), and from his loins will come trials whose smoke will reach the sky." At this a man from among the Muslims said: Allah and His Messenger have spoken the truth; he is far too lowly and contemptible for such a thing to come from him. He (peace and blessings be upon him) said: "Indeed it will, and on that day some of you and some of them will be his followers."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13545