The country has seen a surge of unrest in recent days, including uprisings at prisons and the killing of police officers, which the authorities have blamed on gangs.