Narrated Jarir: While I was at Yemen, I met two men from Yemen called Dhu Kala and Dhu 'Amr, and I started telling them about Allah's Messenger ﷺ. Dhu 'Amr said to me, "If what you are saying about your friend (ie the Prophet) is true, then he has died three days ago". Then both of them accompanied me to Medina, and when we had covered some distance on the way to Medina, we saw some riders coming from Medina. We asked them and they said, "Allah's Messenger ﷺ has died and Abu Bakr has been appointed as the Caliph and the people are in a good state'. Then they said, "Tell your friend (Abu Bakr) that we have come (to visit him), and if Allah will, we will come again". So they both returned to Yemen. When I told Abu Bakr their statement, he said to me, "I wish you had brought them (to me)". Afterwards I met Dhu 'Amr, and he said to me, "O Jarir! You have done a favor to me and I am going to tell you something, ie you, the nation of 'Arabs, will remain prosperous as long as you choose and appoint another chief whenever a former one is dead. But if authority is obtained by the power of the sword, then the rulers will become kings who will get angry, as kings get angry, and will be delighted as kings get delighted".
This hadith teaches us an important lesson about how leaders should be chosen for any nation or group - through consensus rather than force or power of sword - so that everyone can agree on it without any conflict or disagreement arising between them due to different opinions or views on who should lead them next after someone dies or leaves office. It also teaches us how important it is for leaders to be chosen this way so that peace can prevail among people instead of anger and hatred due to differences in opinion leading up to fights between people over who should lead them next after someone dies or leaves office.