Pakistan's Supreme Court has ordered that a couple jailed for perjury in a row over the husband's sex should be released on bail, their lawyers say.
Doctors say Raj is still a woman, despite sex change operations
The ruling came after a judge agreed to hear appeals against the convictions.
The couple say they are man and wife, but the Lahore high court ruled last month that the husband was, in fact, a woman, despite sex-change surgery.
The case is thought the first of its kind in Pakistan where homosexuality and trans-sexuality are largely taboo.
Shumail Raj, 31, had sex-change surgery to become a man and then married Shahzina Tariq, 24, a cousin.
She was aware of his condition but says she needed his help to avoid being forced into wedlock with someone else.
The couple originally sought the protection of the courts but were arrested last month after the bride's family questioned whether Raj was a man.
Judges in Lahore jailed the couple for three years and fined them 10,000 Pakistani rupees ($165).
They found that the couple had lied about Raj's sexual status and said their marriage was un-Islamic because it was same-sex.
But on Thursday, the couple's lawyers said the judgement of the high court had been suspended
"The Supreme Court has ordered their release," said lawyer Babar Awan, Reuters news agency reports.
Bail is reported to have been set at 50,000 rupees ($825) each.
No date has been given for the appeal hearing to begin.
Raj is reported to have undergone surgery twice in Pakistan over the past 16 years to become a man.
Shumail Raj (left) and Shahzina Tariq appealed to the president
But tests carried out by doctors on behalf of the Lahore high court ruled that Raj, who has a beard and moustache, was still a woman.
Raj himself says that he needs to go abroad for more treatment even though his breasts and uterus have been removed.
Ms Tariq's family wants to annul the 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.
Ms Tariq says they are not homosexuals and they married because they are in love.