Saad bin Abu Waqqas reported,

The Messenger of Allah ﷺ left Ali bin Abu Talib behind during the expedition of Tabuk.Ali said, "Messenger of Allah, are you leaving me behind with the women and children?"He replied, "Are you not content to be to me what Harun was to Musa, except that there is no prophet after me?"

Azami 759

Sahih

عن سعد بن أبي وقاص، قال

خلف رسول الله ﷺ علي بن أبي طالب في غزوة تبوك، فقال: يا رسول الله، تخلفني في النساء والصبيان؟ فقال: أما ترضى أن تكون مني بمنزلة هارون من موسى، غير أنه لا نبي بعدي.

الأعظمي 759صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Faith in the Prophet ﷺ
Section
Statement of the Prophet ﷺ to Ali, "You are to me in the position of Harun to Musa, except that there is no prophet after me"
Numbering
Jami al-Kamil 759 (2nd edition)
Azami 759