The U.N. expressed its concern as governments in Azerbaijan, Egypt, and Indonesia target LGBT communities

More than 80 were arrested in Azerbaijan since mid-September, allegedly subjected to electric shocks and other forms of abuse

50 were arrested in Egypt after being tracked down through chat rooms and apps, some being forced to undergo physical "examinations"

More than 50 were arrested in Indonesia, including five under the "Law on Pornography" for consensual same-sex relations

United Nations officials expressed deep concern regarding waves of arrests targeting the LGBT populations of Azerbaijan, Egypt, and Indonesia.

Law enforcement officials in the three countries recently arrested more than 180 people thought to be lesbian, gay, bisexual or transgender, spokesman for the U.N. High Commissioner for Human Rights Rupert Colville said on Friday. Many of those arrested were allegedly then mistreated or abused, Colville said.

More than 80 of those people were arrested in Azerbaijan since mid-September and allegedly subjected to electric shocks, beatings, forced shaving and other forms of humiliation and intimidation to incriminate themselves, the U.N. spokesman said.

All of those detained have reportedly been released, but several were held on charges of "hooliganism" and "resisting a police order" and many were subjected to forced medical examinations and had information about their health status released to the media.

In Egypt, 50 people were entrapped by law enforcement on apps and Internet chat rooms and then arrested for their assumed sexual orientation or gender identity. Two people were also arrested for waving a rainbow flag at a concert and another was arrested for running a Facebook page.

Charges for the arrests included "habitual debauchery," "inciting indecency and debauchery" and "joining a banned group."

At least 10 men were given between one- and six-year prison sentences and several were forced to take part in intrusive physical "examinations."

More than 50 people in Indonesia were arrested at a sauna in Jakarta on Friday and four men and one woman were charged under Indonesia's "Law on Pornography," which includes consensual same-sex relations.

The U.N. condemned the arrests as violations of international law and said the three countries should take immediate action to release those detained and drop all charges.

"Arresting or detaining people based on their actual or perceived sexual orientation or gender identity is by definition arbitrary and violates international law - including rights to inter alia privacy, non-discrimination, equality before the law and equal protection of the law," the U.N. said. "Arresting and detaining people for legitimately expressing themselves - including by displaying a rainbow flag - is also arbitrary and violates individuals' right to freedom of expression."

This article has been adapted from its original source.