Chinese authorities are disputing whether sex tourists looking for a "happy ending" massage can safely enjoy the skills of local masseuses without fearing interruption by a police raid.
A Guangdong court in southern China ruled that masturbating men for money was not prostitution and hence legal.
But as news of the ruling spread, Beijing police in the north rushed out a statement to reaffirm that providing or receiving any kind of sexual favour for money was unlawful under Ministry of Public Security regulations.
The case erupted as the Intermediate People's Court in Foshan, a town of seven million people in eastern Guangdong province, acquitted the owner of a massage parlour and several employees of prostitution charges.
The defendants were arrested in a police crackdown on local hair salons that offered auxiliary services such as "breast massages" and "manual stimulations".
According to the court, as no sexual intercourse was involved, the practices were legal.
"We may find it uncomfortable ethically, but there is no proof in the law to declare them guilty," Guangdong criminal lawyer Luo Guangfei told the Global Times.
Chinese court rulings generally do not set binding precedents.
Although illegal, the Chinese sex trade market is well-established and employs six million people, according to a recent report by Human Rights Watch.
The group denounced the authorities' heavy-handed tactics against prostitution, saying female sex workers were often the target of police abuses, including torture, beatings, physical assaults, arbitrary detentions, and fines.
"In China, the police often act as if by engaging in sex work, women had forfeited their rights," said Sophie Richardson, China director at Human Rights Watch.