It is narrated that Imam Mahdi (AS) said "Why do you go to places where it becomes necessary for you to say your prayers in the leadership of the non-believers?"
(Insaaf Nama - Matan Sharif, N.4)