A suicide bomber detonated explosives during crowded prayers at a mosque inside a police compound in Pakistan on Monday, causing the roof to cave in.