More than 5000 arrests after rioting