the authentic hadith collection:
“For there is merit in it.”
If prayer becomes due while a man and his companions are in one place, but they leave without praying there and go elsewhere because that place contains a trace of one of the prophets, they have acted contrary to the Sunnah.
ʿUmar ibn al-Khattāb, may Allah be pleased with him, saw some people repeatedly visiting a place where the Messenger of Allah, may Allah bless him and grant him peace, had prayed. He asked, “What is this?”
They replied, “This is a place where the Messenger of Allah, may Allah bless him and grant him peace, prayed.”
He said, “A place where the Messenger of Allah prayed! Do you intend to turn the sites associated with your prophets into places of worship? It was precisely through such things that the Children of Israel were ruined. Whoever happens to be there when prayer becomes due should pray there; otherwise, he should move on.”
As for his mosque, which has special merit, prayer there is recommended because he accorded it preference. How much more so when he said:
“One prayer in this mosque of mine is better than a thousand prayers elsewhere, except in the Sacred Mosque.”
He also said:
“Do not undertake a journey except to three mosques: the Sacred Mosque, al-Aqsā Mosque, and this mosque of mine.”
This merit belonged to it before the chamber was incorporated into it. Indeed, those who prayed there at that time were better than those who would pray there thereafter until the Day of Resurrection. It must not be thought that, after the chamber was incorporated into it, the mosque became superior to what it had been during his lifetime and the lifetimes of his rightly guided caliphs. Rather, if merit varies with times and people, then his time and that of the rightly guided caliphs were superior, and the people of those times were superior. Thus, if these differences affect its merit, the mosque was superior then, before the chamber was incorporated into it; and if they do not,