BEIJING, SEPT. 8 -- The U.S. Embassy today warned American citizens here that foreigners entertaining Chinese nationals of the opposite sex in their hotel rooms may be detained, interrogated and heavily fined by the police.

An "important notice for American citizens" was posted at the U.S. consulate following a series of incidents over the past month when police apprehended foreigners who had invited Chinese to their hotel rooms.

Western diplomats said citizens of the United States, Japan, West Germany and other nations have paid fines as high as 4,000 yuan, or about $1,078.

Some diplomats believe the police crackdown is part of a new morals campaign designed to impose discipline before a major Communist Party congress scheduled to convene Oct. 25.

The crackdown may also be related to efforts to prevent the spread of acquired immune deficiency syndrome. Only a handful of AIDS cases have been reported so far in China.

Diplomats said the largest fine to date -- of about $2,695 -- was imposed on a West German businessman working for the Siemens electronics company. The businessman was found in bed with a Chinese woman in a hotel room here. The man paid the fine, and Siemens asked him to leave the country.

The price is higher for a Chinese caught with a foreigner in such a compromising situation. According to recent Chinese press reports, some Chinese prostitutes have been sent to labor camps for two years. Chinese pimps can be sentenced to longer terms.

In its notice to U.S. citizens today, the embassy said those detained for questioning should notify the embassy as quickly as possible.

A diplomat said that in the recent incidents, police have questioned foreigners for as long as six hours, and in some cases overnight.

Most of the foreigners have been required to sign a "confession" stating that they regret having committed a wrong, the diplomat said.

The largest number of incidents, perhaps a dozen, has been reported in the city of Shanghai, where the police have a reputation for paying close attention to relationships between foreigners and Chinese of the opposite sex.

In Beijing, the Chinese Foreign Ministry told diplomats that the foreigners involved were accused of violating a regulation that prohibits prostitution.

According to Chinese officials, violators may be detained for up to 15 days. The regulation provides for those who "refuse to repent" to be sent to a labor camp and fined up to $1,348.

In one case, an American and his Chinese fiancee were apprehended by the police. The American "came close to punching" a policeman but restrained himself, a diplomat said.

Another American, caught with a prostitute, paid a $1,078 fine and continued his travels.

In a Shanghai incident late last month, an American woman encountered a former Chinese classmate. According to the woman, the two were apprehended after they went to the hotel room to pick up the man's camera.

The woman, whose name has not been disclosed, refused to sign a confession. The police later told her that she was free to leave the country, and she left China the following day.