Police shot dead a 22-year-old Danish-born gunman, identified in several Danish media outlets as Omar El-Hussein, on Sunday after he killed two people at a Copenhagen synagogue and an event promoting free speech in actions possibly inspired by an attack on the French satirical weekly Charlie Hebdo, authorities said.