The detentions raised the stakes in a crackdown on dissent and underscored the sensitivity of Chinese leaders to criticism ahead of the anniversary.