(Getty)

Four gay men face up to 16 years in prison after being arrested for pictures they posted online.

The Indonesian men are suspected by the police of spreading gay pornography online, but seem to have been targeted simply because they enjoy BDSM.

A reader who contacted PinkNews said: “Today, my friend was put in jail in Indonesia for taking pictures when playing BDSM with his submissive.

“The picture doesn’t even have genitals in it. They think it’s porn because they simply don’t understand BDSM, and they hate gays.”

Police Brigadier General Fadil Imran said that he had arrested “perpetrators of dissemination of videos and photos of sexually immoral content with the classification of BDSM”.

He listed items which had been confiscated from the first pair arrested, two men aged 42 and 30, one of whom runs the Facebook page which police say has been spreading porn.

The official listed “straps, rubber whips, handcuffs, candles, iron chains, body vests, mouth masks, masks, body leather belts, chopsticks, and whip tools.

He said that from the other pair, authorities confiscated “clamp clothes, clothesline, dog chains, candles, baby oil and massage tools.”

Gay sex is legal in Indonesia, but authorities have repeatedly targeted LGBT people.

Earlier this year, lawmakers in the country approved a proposed bill which would outlaw ‘LGBT behaviours’ on television.

In Aceh, a region of the otherwise secular country which imposes Shariah law, two men were caned 83 times as a legal punishment for having gay sex.

The men were informed on by their neighbour, who took video footage.

The video shows vigilantes kicking, slapping and insulting the men.

The canings came a day after 141 men were arrested in the capital, Jakarta, for having a “gay sex party”.

And last month, police arrested 58 people in a raid on a gay sauna.

They acted after members of the public reportedly complained that the building was being used for sex work.