Image copyright AFP Image caption Transgender activists said it was a win for all Malaysians

Three Malaysian transgender women have won an appeal against a religious law banning Muslim men from wearing women's clothing.

Appeals court Judge Mohamad Yunus said the "degrading, oppressive and inhumane" law discriminated against people with gender issues.

Gender issues and homosexuality remain taboo areas in Malaysia.

The appellants' lawyer said the ruling in the religiously conservative country would be "historic".

"This will be a precedent. This court binds all other high courts," Aston Paiva was quoted as saying by AFP news agency.

All Muslims in Malaysia are subject to Islamic laws, under a double-track legal system.

Men dressing or acting as women is illegal under those laws, with offenders facing jail terms of up to three years. Some states also forbid women dressing as men.

The appellants, all Muslims who were born male but identify as women, were arrested four years ago.

The BBC's Jennifer Pak reports that they said they had been assaulted by Islamic officers and jailed for wearing things like hair clips.

In 2012, a lower court ruled that they were born male so they had to wear men's clothing.

The women did not appear in court but one told the AFP news agency by telephone: "I am happy we won the case. I feel more relaxed now."

Image copyright AFP Image caption Rights groups say transgender men and women face discrimination from officials in Malaysia

'Human dignity'

But the three-judge appeal panel said the section of Sharia law in Negeri Sembilan state in question "deprives the appellants of the right to live with dignity".

"It has the effect of denying the appellants and other sufferers of GID (gender identify disorder) to move freely in public place," said Judge Hishamudin Yunus.

Rights groups welcomed the decision.

"This is a win for all Malaysians, as the constitution protects us all, irrespective of ethnicity, gender and class," Ivy Josiah of the Women's Aid Organisation told Reuters. "Surely no court, civil or Sharia, can refute the fact that human dignity is paramount."

Human Rights Watch has listed Malaysia as one of the worst places in which to be a transgender person.

In a report in September, the US-based rights group said they face worsening persecution with abuses including arrest and physical and sexual assault by religious authorities and police.

The report points to instances of public shaming by forcing transgender women to take off their clothes in public and barriers to accessing healthcare, employment and education.