Police in Indonesia have set up a task force to target the gay community amid a country-wide crackdown on homosexuality.

Anton Charliyan, police chief of West Java, the country's most populous province, announced the plan on Tuesday, saying gays suffer 'a disease of the body and soul'.

It comes after two men were whipped for having gay sex in Aceh province on Tuesday, and after police arrested 141 men over a 'gay sex party' at a sauna in the capital Jakarta on Sunday.

Homosexuality is legal everywhere in Indonesia, the world's most populous Muslim-majority country, except Aceh where it is prohibited under sharia law, which also prohibits people from dressing provocatively and stops women going out at night.

Police in West Java, Indonesia, have announced a task force to target gays amid a nationwide crackdown. Aceh province, which is ruled by sharia law, is the only place to officially ban homosexuality (pictured, a punk is arrested in Banda Aceh for dressing provocatively)

Morality police are used to enforce strict sharia law in Aceh, though scenes like this could be about to spread around Indonesia after another police force announced a task force to target 'secret parties' held by homosexuals

Aceh is the only province to officially outlaw homosexuality, though the country's parliament will soon vote on a nationwide law (pictured, a woman is arrested by morality officers for being outside after midnight)

Gays across Indonesia are often targeted using loosely-worded pornography laws.

Responding to the Jakarta raid, Charliyan said: 'I hope there are no followers in West Java, no gay or LGBT lifestyle or tradition.

'If there's anyone following it, they will face the law and heavy social sanctions. They will not be accepted in society.'

He also called on members of the public to report suspicious activity to the police.

The two men in Aceh province, aged 20 and 23, were caught after vigilantes burst into their home and filmed them in bed together while abusing and spitting on them.

Charliyan said the police 'task force' would include intelligence specialists and was concerned with disrupting 'secret parties'.

A spokesman for national police said Charilyan's approach does not reflect federal policy, though he noted officers 'regularly' carry out such raids.

Two gay men were also whipped in Banda Aceh on Tuesday after they were caught having sex by vigilantes who filmed the encounter on their phones

The men, aged 20 and 23, were given 82 lashes each outside a mosque in Banda Aceh as a crowd of thousands gathered to watch and jeer them

Charliyan's comments follow a spate of high-profile police actions against gay clubs and parties just as the country's Constitutional Court is due to rule on a petition to outlaw homosexuality and adultery.

On Sunday, police detained 141 men and released photos of some of them in varying states of undress to the media, revealing many of their identities.

Only 10 of the men have been declared suspects, five remain under investigation and 126 were released.

The police said the photos were released due to 'procedural errors'.

However, LGBT activists said the release of the images was part of a police pattern of publicly shaming of gay people.

The two Acehnese men, caned 82 times each on Tuesday, were punished in front of a crowd of more than 1,000.

In Indonesia's second-largest city of Surabaya in East Java, 14 gay men were arrested, tested for HIV and the results made public, Indonesian media reported.

Police chief Anton Charliyan said gay people have 'a disease of the body and soul' as he announced the new force. It comes after officers in Jakarta arrested 141 men in a raid on a 'gay sex party' in a sauna (pictured)

Officers in Jakarta paraded the men they arrested in front of TV cameras, along with outfits and sex equipment taken from the club

Police also escorted journalists around the club and handed out images of the arrested men, revealing many of their identities, despite most later being released without charge

On Tuesday, North Jakarta police chief Dwiyono took journalists through the gay club raided on Sunday.

As they climbed three floors, he pointed out a gym, a communal jacuzzi used for 'striptease' and a cluster of cubicles for sex.

'This door can only be opened if you pay 185,000 rupiah ($14) to the receptionist,' he said. 'In here, there's no change room, you just tear off your clothes and use a towel.'

Indonesian President Joko Widodo last year gave qualified support for the gay community, telling the BBC that 'there should be no discrimination against anyone'.

However, his defence minister, Ryamizard Ryacudu, suggested that homosexuality was a national security threat and part of a 'proxy war' waged against Indonesia by foreign states.

A Pew Research Center poll in 2013 found 93 percent of respondents in Indonesia disagreed that 'society should accept homosexuality'.

Indonesia's Islamist groups have long called for the criminalisation of gay sex.

The Islamic Defenders Front, the vigilante group that led huge rallies against the now-convicted Jakarta governor, has cooperated with police in curbing alleged vice for more than a decade.