Indonesia must clamp down on rising intolerance against the LGBT community, the UN human rights chief warned Wednesday, as the persecuted minority face a wave of arrests and parliament moves to ban gay sex.

Government officials, religious hardliners and influential Islamic groups have lined up to make anti-LGBT statements in public recently, while police have used a tough anti-pornography law to criminalise members of the lesbian, gay, bisexual and transgender (LGBT) community.

"The hateful rhetoric against this community that is being cultivated seemingly for cynical political purposes will only deepen their suffering and create unnecessary divisions," UN High Commissioner for Human Rights Zeid Ra'ad Al Hussein told a press conference in Jakarta, as he wrapped up a three-day visit.

Since the fall of dictator Suharto in the late 1990s, Indonesia has become one of the region's most progressive on human rights, he added.

"Indonesia has since 1998 managed to transition to democracy and couple it with strong economic growth," he said.

"At a time when it is consolidating its democratic gains, we urge Indonesians to move forward - not backwards - on human rights."

His remarks come amid a crackdown on the small LGBT community in the world's largest Muslim-majority nation.

Parliament is set to pass a sweeping amendment to its penal code that could make same-sex relations and sex outside marriage illegal.

Rights groups have slammed the proposed amendments, saying they amount to an unprecedented invasion of privacy.

"Any discriminatory provisions need to be removed," the rights chief said.

He said he raised the issue of LGBT discrimination with senior officials, including President Joko Widodo, after a spate of recent attacks against the community.

Last month, Google pulled one of the world’s largest gay dating apps from the Indonesian version of its online store in response to government demands.

Homosexuality and gay sex are legal in Indonesia -- except in conservative Aceh province, which is ruled by Islamic law -- but same-sex relationships are widely frowned upon and public displays of affection between gay couples almost unheard of.

In Aceh, police forcibly cut the hair of a group of transgender women recently and made them wear male clothing, sparking protests from rights groups.

The rights chief also said he discussed allegations of abuses in Papua, indigenous rights and the protection of minority religious groups