Sayyidah Khawlah bint Hakim al-Aslamiyyah (may Allah be pleased with her) says: I heard the Messenger of Allah (peace and blessings be upon him) say: "Whoever stops at a place and then says: 'A'udhu bi-kalimati Allahi al-tammati min sharri ma khalaq' (I seek refuge in the perfect words of Allah from the evil of what He has created), nothing will harm him until he departs from that place of his."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 10322
Sayyiduna Anas (may Allah be pleased with him) says that whenever the Messenger of Allah (peace and blessings be upon him) stopped at a place, he would not depart until he had prayed two rak'ahs there.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 10323