When the Messenger of Allah ﷺ returned from his pilgrimage and entered Madinah, he made his camel kneel at the door of his mosque, then he went inside and prayed two rakahs in it, after which he departed to his house.Nafi said, "Ibn Umar used to do the same."
حدثنا محمد بن منصور الطوسي حدثنا يعقوب حدثنا أبي عن ابن إسحق حدثني نافع
أن رسول الله ﷺ حين أقبل من حجته دخل المدينة فأناخ على باب مسجده ثم دخله فركع فيه ركعتين ثم انصرف إلى بيته قال نافع فكان ابن عمر كذلك يصنع