Jakarta: Indonesian police detained 51 men including several foreigners in a raid on what authorities described as a "gay spa" in Jakarta late on Friday, and some could face up to six years in prison under pornography and prostitution laws.

The arrests are the latest in a spate of high-profile police actions against gay clubs and parties in Indonesia this year that have called the country's reputation for tolerance into question.

With the exception of the ultra-conservative Aceh province in northern Sumatra, where Islamic law is enforced and two men were publicly flogged last month for gay sex, homosexuality is legal in Indonesia, home to the world's largest Muslim population.

Among those detained at the spa in Central Jakarta on Friday were four Chinese nationals, a Singaporean, one Thai national, one Malaysian, and one Dutchman, although none of the foreigners would be charged, Jakarta Police spokesman Argo Yuwono told Reuters on Saturday.

When asked about what the people in the spa were doing at the time of the raid, Yuwono noted that it was dark at the time.