A Pakistani court has remanded a couple in custody after ruling that the husband was actually a woman and their same-sex marriage was against Islam.
The case is believed to be one of the first of its kind in the country.
The judge ruled that the pair had lied over the husband's gender. He said that a sex change operation he had to become a woman was not carried out properly.
The couple told the court that they had got married so that the wife could avoid an arranged marriage.
Shumail Raj, 31, had sex-change surgery to become a man and then married his cousin - who was aware of the condition but says she needed his help to avoid being forced into wedlock with someone else.
The bride's father wants to annul his daughter's wedding on the grounds that it is against Islam for two women to marry.
But the couple argue that they married to protect the bride from being sold into marriage to pay off her uncle's gambling debts.
The two were arrested last week after the bride's family complained about the gender of her husband.
The High Court in the eastern city of Lahore ruled that Mr Raj had earlier lied to the court by saying he was a man.
"Neither Islam nor our law allows marriages of the same sex. This mistake cannot simply be overlooked," Lahore High Court judge Khawaja Sharif told the couple.
"Why should a case be not registered against you for committing an unnatural offence and telling a lie?" he asked.
I decided to help her out when she came to me with the problem... she just needs protection .
The judge ordered that Mr Raj be sent to jail in Lahore and his wife, Shahzina Tariq, be jailed in her home town of Faisalabad, pending their trial.
Correspondents say that if convicted of an "unnatural offence" - a term used for homosexuality - they could be sentenced to life in prison.
Shahzina Tariq said they married because they were in love.
"We're not homosexuals. Ours was a love marriage," the 24-year-old woman, clad in a long shawl, told reporters after the verdict.
"It was the fear of forced marriage which compelled me to convince Shumail for marriage," Dawn newspaper quoted her as saying.
"I was fully aware of Shumail's physical condition."
Mr Raj has undergone surgery twice in Pakistan over the past 16 years to become a man.
But tests carried out by doctors on behalf of the court ruled that he was still a woman, and he himself says that he needs to go abroad for more treatment even though his breasts and uterus have been removed.