JAKARTA, Indonesia (AP) — The U.N. human rights chief says "strains of intolerance" once thought foreign to Indonesia are making inroads in the world's most populous Muslim nation and warned the government against criminalizing its LGBT citizens.

Zeid Ra'ad al-Hussein said Wednesday that "extremist views" playing out in mainstream Indonesian politics are "deeply worrying" and are accompanied by rising levels of incitement to discrimination, hatred and violence.

Zeid was speaking on the last day of a three-day visit to Indonesia where he met officials including President Joko "Jokowi" Widodo, civil society organizations and victims of human rights abuses including indigenous Papuans and farmers dispossessed by land grabs by agricultural conglomerates.

He said if Muslim societies such as Indonesia expect others to fight Islamophobia, then such societies should be prepared to end discrimination on other grounds too.

Indonesia's parliament is considering amendments to the criminal code that would outlaw all sex outside marriage and criminalize the country's besieged LGBT minority.

For the past two years LGBT people have been targets of an escalating campaign of raids, arrests, hate-inciting rhetoric from officials and vigilante attacks. Earlier this month, police in conservative Aceh province rounded up 12 transgender women who worked in hair salons and publicly berated them to become masculine, forced them into men's clothing and cut their hair.

"The hateful rhetoric against this community that is being cultivated seemingly for cynical political purposes will only deepen their suffering and create unnecessary divisions," Zeid said.

Local media reported Wednesday that Jokowi cited local culture and beliefs in telling Zeid that lesbian, gay, bisexual and transgender people are not acceptable in Indonesia. Jokowi also said the government would not "overcriminalize" gay Indonesians, according to the reports.

Rights groups and legal experts say Islamic and secular political parties are exploiting anti-gay prejudice to burnish their conservative credentials ahead of provincial elections later this year and presidential and parliamentary elections in 2019.