One of the risks is that Islamist militants could seize on growing anger to increase support for their war against the state.