CHAPTER: The Places In Which Prayer Is Not Allowed.
Narrated Abu Dharr: The earth has been made for me purifying and as a mosque (place for prayer).
Narrated Ali ibn Abu Talib: Abu Salih al-Ghifari reported: Ali (once) passed by Babylon during his travels. The muadhdhin (the person who calls for prayer) came to him to call for the afternoon prayer. When he passed by that place, he commanded to announce for the prayer. After finishing the prayer he said: My affectionate friend (i. e. the Prophet) prohibited me to say prayer in the graveyard. He also forbade me to offer prayer in Babylon because it is accursed.
Abu Salih narrated this tradition with a different chain of transmitters to the same effect as reported by Sulaiman bin Dawud. But this version has the word KHARAJA (he went out) instead of BARAZA (proceeded).
Narrated Saeed: and the narrator Musa said: As far as Amr thinks, the Prophet صلی اللہ علیہ وسلم said: The whole earth is a place of prayer except public baths and graveyards.