BEIJING (AP) _ China's most famous dissident, detained in a police sweep of prominent political activists, called a friend today to say he had been released and would return home this evening.

''He called to say he is free, his detainment is finished,'' the friend said of Wei Jingsheng. ''He will have dinner with friends and return to Beijing this evening.''

Wei said he was calling from the Beijing suburb of Changping, but did not give other information during the brief, two-minute call, the friend said.

Wei was detained Friday morning, in a roundup of democracy activists one week before Secretary of State Warren Christopher is to arrive to push for human rights.

The police sweep appeared to be a slap at the United States, coming at the end of a visit by the State Department's top human rights envoy.

Wei has been outspoken ever since he was released from prison last September after serving more than 14 years for his pro-democracy activities.

On Thursday, Zhou Guoqiang, a prominent dissident who supported a peace charter calling for non-violent political reform, was detained by police for ''illegal activity,'' the Beijing-backed Hong Kong China News Agency reported.

The human rights group Asia Watch said it had confirmed the detention of dissident Qian Yumin on Wednesday. Beijing University confirmed Friday the arrest of dissident law professor Yuan Hongbing, saying he was accused of involvement in a criminal case. A postgraduate student close to him - Wang Jiaqi - was taken from a dormitory by police.

Bao Ge and Yang Zhou, two Shanghai dissidents, were detained for nearly 24 hours before being released.

Wang Dan, a student leader from the 1989 pro-democracy movement, said he was picked up by police late Wednesday night and held for 24 hours. Police urged him to leave Beijing, apparently so he would not cause trouble during the annual meeting of the national legislature that begins Thursday, but Wang said he refused. Another 1989 student leader, Ma Shaofang, reportedly was missing.

Dissidents are often told to leave Beijing or warned not to cause trouble during important meetings of the legislature or ruling Communist Party. That could help explain the rash of detentions this week.

But Robin Munro, the Asia Watch representative in Hong Kong, said the detentions may also be a defiant response to U.S. pressure to improve human rights, expected to intensify when Christopher arrives next week.