Whoever enters a mosque where adhān has been given is disliked to leave before prayer unless he is an imām or muʾadhdhin going to his congregation, or he has already prayed the obligatory and leaves—unless prayer starts before he leaves: then he follows voluntarily in Ẓuhr and ʿIshāʾ and leaves in the rest.