We were returning with the Prophet ﷺ, myself and Abu Talha, with Safiyyah riding behind him on his she-camel. When we reached the outskirts of Medina, he said, "We return, repenting, worshipping our Lord, praising Him." He kept repeating this until we entered Medina.
أقبلنا مع النبي ﷺ أنا وأبو طلحة وصفية رديفته على ناقته حتى إذا كنا بظهر المدينة قال: آيبون تائبون عابدون لربنا حامدون. فلم يزل يقول ذلك حتى قدمنا المدينة.
Bukhari narrated it in jihad and expeditions (3085, 3086), and Muslim in Hajj (1345), and this wording is his, both of them through Yahya bin Abu Ishaq, from Anas bin Malik, who narrated it.