Bara bin Azib reported,

He said, the Prophet ﷺ performed Umrah in the month of Dhul-Qadah. The hadith continues, and within it is the story of Hamza's daughter, who followed them as they were leaving Makkah. Ali took her by the hand and said to Fatimah, "Take your cousin and carry her along."Then Ali, Zayd, and Jafar disputed over her custody.Ali said, "I have the greater right to her, for she is my cousin."Jafar said, "She is my cousin too, and her maternal aunt is my wife."Zayd said, "She is my brother's daughter."So the Prophet ﷺ ruled that she be given to her maternal aunt, saying, "The maternal aunt holds the position of a mother."He said to Ali, "You are from me and I am from you."He said to Jafar, "You resemble me in appearance and in character."And he said to Zayd, "You are our brother and our freed servant."

Azami 6588

Sahih

عن البراء

قال اعتمر النبي ﷺ في ذي القعدة… الحديث وفيه قصة ابنة حمزة وأنها تبعتهم حين الخروج من مكة، فتناولها علي فأخذ بيدها وقال لفاطمة: دونك ابنة عمك احمليها، فاختصم فيها علي، وزيد، وجعفر، فقال علي: أنا أحق بها، وهي ابنة عمي، وقال جعفر: ابنة عمي وخالتها تحتي، وقال زيد: ابنة أخي، فقضى بها النبي ﷺ لخالتها وقال: الخالةبمنزلة الأم وقال لعلي: أنت مني وأنا منك وقال لجعفر: أشبهت خلقي وخلقي، وقال لزيد: أنت أخونا ومولانا.

الأعظمي 6588صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Divorce
Section
Custody by the maternal aunt
Numbering
Jami al-Kamil 6588 (2nd edition)
Azami 6588