Praying in a Place Where Staying There Is Haram
Issue No.808- One should not perform prayer anywhere that it is haram to stay, (e.g., under a roof which is about to collapse, or at a place where there is the danger of landslide or flood), and in case he offers his prayer there, he should, as an obligatory precaution, repeat his prayer. Also, it is not permissible to offer prayer on an object upon which it is haram to step or sit, like a carpet with the name of Allah on it.