The United Nations says at least 31 people were killed and thousands more were detained in the crackdown .