BEIJING — Police officers on Monday evening released five female activists who were detained early last month in China after trying to start a campaign against sexual harassment on public transportation, two lawyers representing the women said.

One of the lawyers, Liang Xiaojun, said police officers in western Beijing, where the five women were held for weeks, had to release the detainees after prosecutors decided not to immediately press criminal charges. The police had asked the prosecutors last week to charge all five women with organizing a crowd to disturb public order.

The women, who were freed on bail, are Li Tingting, 25; Wu Rongrong, 30; Zheng Churan, 25; Wei Tingting, 26; and Wang Man, 33. Mr. Liang said that an investigation into their activities was continuing, and that they would be monitored by the police for one year and could not travel without informing the authorities. The police can detain them again at any time or interrogate them further, he said.

Ms. Zheng, referring to herself using a nickname, left a message for the public on a social media chat program: “Hi all, I’m Big Rabbit. I’m back. Thank you all. I’ll contact you after I get some good rest. Thanks.”