A Kuwaiti court has said a 25-year-old man who underwent sex-change surgery can be officially regarded as a woman.
The unprecedented ruling came after the court was told of the plaintiff's physical and mental torment since childhood due to hormonal imbalances.
Lawyer Adel al-Yahya told Reuters news agency the judges were guided by a religious edict allowing gender change if there are medical reasons for it.
The ruling has to be approved by a higher court before it becomes final.
Mr Yahya, the plaintiff's lawyer, said he presented the court with an edict from Sunni Islam's top religious institution, al-Azhar, in Egypt.
This allows people to change their gender if there are proper medical reasons for doing so.
"We have evidence, a fatwa from al-Azhar, because we have a case of illness, not a case of switching gender or as they call it in Kuwait a third-sex case," he told Reuters.
"This is a very rare condition... and the court ruled according to that condition."
Mr Yahya said the process of getting final approval for the ruling may take up to a month.