If the masjid was built over the grave, you must not pray there. If a masjid and a grave of a so called wali share same boundaries or it may link together by an opening can we pray in such a mosque? Shirk and its different forms | August 9, 2015 5:05 pm