It is narrated from Sayyiduna Ali (may Allah be pleased with him) that he stood on the pulpit, then mentioned the Messenger of Allah (peace and blessings be upon him) and said: "The Messenger of Allah (peace and blessings be upon him) passed away and Sayyiduna Abu Bakr (may Allah be pleased with him) was made caliph. He acted according to his (peace and blessings be upon him) practice and followed his (peace and blessings be upon him) way until Allah, the Mighty and Majestic, took his soul in that very state. Then Sayyiduna Umar (may Allah be pleased with him) was made caliph, and he acted as the two of them (the Prophet (peace and blessings be upon him) and Sayyiduna Abu Bakr (may Allah be pleased with him)) had acted and followed the way of those two until Allah Almighty caused him to die in that very state."
Ibn Numayr (may Allah have mercy on him) narrated it from Ibn Sal' (may Allah have mercy on him).
Related hadith on this topic