The gunman was shot and killed by a good Samaritan.