A gunman shot dead 49 people and wounded more than 40 at two New Zealand mosques on Friday, some as they were kneeling at prayer, livestreaming online some of the killings in what Prime Minister Jacinda Ardern called an assault on the nation's values.