The bomber detonated his explosives among crowds of Shiites at the door of the mosque , targeting the men who were performing the rites just outside , a police official said , speaking on condition of anonymity because he feared being attacked .