Singapore has annulled a couple's marriage after the spouse's sex-reassignment surgery, the Straits Times newspaper reported on Wednesday, prompting an outcry from a group that campaigns for the rights of gay and transgender people.

Same-sex marriage is not recognized in the wealthy city state and laws on homosexuality and sex between males can mean a prison sentence though prosecutions are rare.

The couple, who were not identified in the report, married in 2015, and the husband subsequently underwent gender-reassignment surgery.

They continued to live together as a married couple, but the authorities learnt of their change of circumstances when they applied to buy a government apartment. Married couples get price concessions on government housing.

Subsequently, the Registry of Marriages declared their marriage void, and the couple were told they no longer qualified for the concessionary price available to married couples.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

RELATED: Popular Christian Author Retracts Support of Same-Sex Marriage

"Singapore law does not recognize a marriage where both parties are of the same sex," a spokesperson for the registry told the Straits Times.

"At the point of marriage, a couple must be man and woman, and must want to be and want to remain as man and woman in the marriage."

OutRight Action International, a rights group focused on lesbian, gay, bisexual and transgender (LGBT) issues, condemned the decision.

"This is blatant discrimination by two government departments that are undermining the rights to family and housing eligible to heterosexual married couples,” Grace Poore, the group's regional coordinator, said in a statement.

Poore called for the marriage to be reinstated and the housing entitlements to be restored.

RELATED: Taiwan's Same-Sex Marriage Ruling Gives Asian Neighbors Hope

Sex-reassignment surgery has been legal in Singapore since 1973 and trans men and women are allowed to officially change their gender. This month, Singapore's annual Pink Dot gay pride rally drew more than 20,000 people, despite new restrictions aimed at keeping foreigners out of domestic politics and barricades put up around the rally site.

Prime Minister Lee Hsien Loong defended the country's position on homosexuality in an interview with the BBC this year, saying Singapore's society was conservative and he was prepared to live with the law "until social attitudes change."

Follow NBC Out on Twitter, Facebook and Instagram