Sayyiduna Ali (may Allah be pleased with him) was passing by the city of Babylon (Babil) when the mu'adhdhin came and informed him of the Asr prayer. When he had passed beyond it, he ordered the mu'adhdhin, who called the iqamah. When he had finished the prayer, he said: "My beloved (peace and blessings be upon him) forbade me to pray in a graveyard and in the land of Babylon, for that land has been cursed."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4364
Abdullah bin Abi Muhill al-Amiri said: We were with Ali bin Abi Talib (may Allah be pleased with him), and we passed by the land of Babylon that had been made to sink, and Ali (may Allah be pleased with him) did not pray there.
(b) Hujr al-Hadrami narrates from Ali (may Allah be pleased with him) that he said: I do not pray in a place that Allah has caused to sink three times.
This prohibition on praying there, if it is established as marfu' (from the Prophet), is not for a reason that relates to the prayer itself, so if someone prays there he does not repeat it; rather it is, and Allah knows best, as in the following narration.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4365
Abdullah bin Umar (may Allah be pleased with them both) narrated that he (peace and blessings be upon him) said: "Do not enter the settlements of the people of Thamud, except that you pass by weeping. If you do not weep, I fear that a punishment like the one that struck them may strike you."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4366
It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Do not pass by those peoples who were punished, unless you pass by weeping. If you do not weep, do not pass by their settlements, lest the punishment that struck them should strike you."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4367
Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) related that when the Prophet (peace and blessings be upon him) passed by the place called al-Hijr, he said: "Do not enter the dwellings of those who wronged themselves except weeping, lest what struck them should strike you." Then the Prophet (peace and blessings be upon him) covered his head and walked quickly until he had crossed the valley.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4368