Two gunmen were killed after opening fire on a security officer outside a community center that was hosting controversial event.