Sayyiduna Anas (may Allah be pleased with him) relates: "Whenever the Messenger of Allah (peace and blessings be upon him) stayed at a place (during a journey), he would not depart from it until he had bid that place farewell by offering two rak'ahs of prayer."
Imam Abu Ya'la also reported this same narration with his chain, except that the words he related are: "When he (peace and blessings be upon him) travelled."
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الجهاد / 1966
Hadith Gradingمحدثین:إسناده ضعيف
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :حديث الباب إسناده ضعيف، بل هو منكر، لمخالفته رواية الثقات. » «أخرجه سنن الدارمي برقم: 2681، وأخرجه المعجم الأوسط للطبراني برقم: 34665، وأخرجه إتحاف الخيرة المهرة بزوائد المسانيد العشرة برقم: 2395، 4301/1»