BEIJING — China detained at least 10 women’s rights activists over the weekend to forestall a nationwide campaign against sexual harassment on public transportation that was to overlap with International Women’s Day, according to human rights advocates and associates of those detained.

At least five of the detained were still being held on Sunday evening, while the others had been released after being interrogated. All were women.

The women still in detention on Sunday evening live in the eastern metropolises of Beijing, Guangzhou and Hangzhou, and had timed the start of the antiharassment campaign to coincide with International Women’s Day on Sunday, according to Chinese Human Rights Defenders, an advocacy group based outside China that had posted on Twitter about the detentions.

Image Li Tingting, who works under the pseudonym Li Maizi, has been known in advocacy circles since 2012.

“Ask Beijing & Guangzhou police: Is it a crime to speak out about sexual harassment in China?” the group said in a Twitter post early Sunday. Hours later, the group said it had learned of another activist, Wu Rongrong, who had been detained by the police in Hangzhou and was still being held.