Abdur Rahman bin Abd Rabb al-Ka'bah says that once I reached Syedna Ibn Amr (may Allah be pleased with him) while he was sitting in the shade of the Ka'bah. I heard him saying: Once we were on a journey with the Prophet Muhammad (peace and blessings be upon him). The Prophet (peace be upon him) stopped at a place and camped. Some of us pitched tents, some went to the pasture, and some started archery. Suddenly, a caller announced that the prayer was ready. We all gathered at once. When I reached the Prophet (peace be upon him), he was delivering a sermon and saying to the people: O people! All the prophets (peace be upon them) who came before me, whatever they considered good for their nation, they informed their nation of it, and whatever they considered evil, they warned them against it. The well-being of this Ummah has been placed in its first part, and the last people of this Ummah will face severe trials and strange matters. Such tribulations will arise that will make the previous ones seem mild. When a trial comes upon a Muslim, he will say, "This will be the cause of my death," and after some time, that too will pass. Whoever among you wishes to be saved from the fire of Hell and to enter Paradise, let death come to him while he believes in Allah and the Last Day, and let him give to people what he likes to receive himself. And whoever gives allegiance to an Imam, giving him the pledge of his hand and the fruit of his heart, let him obey him as much as possible. The narrator says: When I heard this, I pushed my head between two men and said, "Your cousin Mu'awiyah gives us orders (so what should we do)?" He placed his fist on his forehead, then lowered his head, then raised it and said: "Obey him in obedience to Allah, and disobey him in disobedience to Allah." I asked him, "Did you hear this from the Prophet (peace be upon him) yourself?" He said: "Yes! Both my ears have heard this and my heart has preserved it."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 6793