Abu Saeed Khudri reported,

When the Messenger of Allah ﷺ passed away, the speakers of the Ansar rose to address the gathering. Some of them said, "People of the Muhajirun, whenever the Messenger of Allah ﷺ appointed one of you to a position, he would pair with him a man from among us. We therefore think that two men should lead this affair, one from you and one from us."The speakers of the Ansar continued speaking along these lines.Then Zayd bin Thabit stood up and said, "The Messenger of Allah ﷺ was from the Muhajirun, and the leader can only be from the Muhajirun. We will be his helpers just as we were the helpers of the Messenger of Allah ﷺ."Abu Bakr then stood and said, "May Allah reward you well, people of the Ansar, as a community, and may He keep your spokesman firm." Then he said, "By Allah, had you done otherwise, we would not have made peace with you."

Azami 9366

Sahih

عن أبي سعيد الخدري قال

لما توفي رسول الله ﷺ قام خطباء الأنصار، فجعل منهم من يقول: يا معشر المهاجرين، إن رسول الله ﷺ كان إذا استعمل رجلا منكم قرن معه رجلا منا، فنرى أن يلي هذا الأمر رجلان: أحدهما منكم والآخر منا. قال: فتتابعت خطباء الأنصار على ذلك، قال: فقام زيد بن ثابت فقال: إن رسول الله ﷺ كان من المهاجرين، وإنما الإمام يكون من المهاجرين، ونحن أنصاره كما كنا أنصار رسول الله ﷺ فقام أبو بكر فقال: جزاكم الله خيرا من حي يا معشر الأنصار وثبت قائلكم ثم قال: والله لو فعلتم غير ذلك لما صالحناكم.

الأعظمي 9366صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Nearness of his death, his foretelling of it, his passing, and his burial
Section
Gathering of the Muhajirun and Ansar at Saqifah of Banu Saidah
Numbering
Jami al-Kamil 9366 (2nd edition)
Azami 9366