She had pleaded guilty to six charges of sexually penetrating an underage girl with a sex toy and her fingers.
The offence carries a maximum penalty of 20 years' jail with a fine.
Yesterday, Zunika Ahmad, 39, who is biologically female but had lived as a man since she was 16, and had even "married" two women, turned up in the High Court expecting to be jailed for her offences.
Both the prosecution and defence had also agreed on the facts and charges of the case.
But in an unexpected landmark ruling, Senior Judge Kan Ting Chiu rejected Zunika's guilty pleas and acquitted her of the sexual penetration charges.
His reason: Under the law, only a man can be charged with sexual penetration.
Zunika, however, was not let off the hook entirely.
She was jailed for eight months for a lesser charge of performing an obscene act on the girl, who was then 13 and her neighbour, to which she had also pleaded guilty.
In his grounds of decision, Justice Kan said that after hearing Zunika's mitigation plea and the prosecution's submission on sentencing, "a doubt whether a woman could be charged with an offence under Section 376A(1)(b) arose in my mind".
He pointed out that the section referred to the sexual assault offender as "a person (A) who sexually penetrates, with a part of A's body (other than A's penis) or anything else, the vagina, or anus, as the case may be, of a person (B) under the age of 16".
Justice Kan said: "On a plain reading... A is a person who has a penis, which A had not used to penetrate B.
"The reference to a person who has a penis cannot be construed to include a woman without doing violence to common sense and anatomy."
Justice Kan said the Government reviewed the Penal Code in 2006, circulated a draft amendment and gathered feedback from the public before introducing the offence of sexual assault by penetration.
The explanatory notes to the draft Bill stated: "Having considered the matter, we have decided not to take the approach that all offences should be 'gender neutral'.
"Many of our laws remain gender specific because they reflect situations where men tend to be the aggressors.
"E.g. rape will remain an offence that only males can commit."
As such, based on the statutory interpretation and having given it further thought, Justice Kan concluded that the provision does not cover women as offenders.
If a court were to interpret A to include a woman, it would be rewriting the law, he said.
The judge added that the "better course" was to leave it to the legislature to amend the provision to make it clear that A includes a woman, if that was indeed the intention.
Criminal lawyers contacted by The New Paper said it could be time for Parliament to review this section of the Penal Code.
Mr Rajan Supramaniam from Hilborne Law said judges do not have the power to amend the law or amend its meaning.
"If it is a gender-specific law, then the judge has to follow it," he said.
"But in light of this case where the offender is a woman, it may be time for Parliament to revisit this section of the Penal Code. The law has to reflect the crimes."
Agreeing that the law should be reviewed, criminal lawyer Louis Joseph said: "Criminals now move faster than the law in this age of the Internet. But with experience, Parliament will learn and modify things.
"In this case, they should look at reviewing it."
Singapore Management University Associate Law Professor Eugene Tan said lawmakers could add another provision to the section to include women or amend it to make it gender neutral.
He also said that Senior Judge Kan was constrained by the gender specificity of the sub-section, but said the judge had carefully and persuasively explained his decision.
"While it would seem like the accused got a relatively lighter sentence in this particular case, the court had to bear in mind that it could not operate as a 'mini-legislature' and rewrite the law."
A spokesman for the Attorney-General's Chamber said: "The prosecution will study the full written Grounds of Decision before deciding on the next appropriate course of action."
Thankful for ruling, sorry for actions
Relieved to escape the sexual penetration charges, and sorry for what she had done.
That was how Zunika Ahmad, 39, felt at the end of yesterday's hearing, her defence lawyer, Ms Sudha Nair, said.
Zunika was facing sentencing for seven charges - six for sexual penetration of a minor and one of committing an obscene act on the girl - at the start of the hearing after pleading guilty to them last December.
Another 14 sexual penetration charges had been stood down or were to be taken into consideration for sentencing.
But yesterday, Senior Judge Kan Ting Chiu rejected her guilty pleas for the six sexual penetration charges and sentenced her to eight months' jail for the remaining charge.
Court papers said Zunika was born a woman but has lived as a man since she was 16 years old.
When she was 20, she started taking Depo-provera injections, a hormone injection that prevents pregnancy, and she later stopped having her period.
She took on jobs such as sales assistant, machine operator or cargo hand but would quit once the companies offered her permanent positions to avoid medical check-ups.
In November 2000, Zunika met her first wife, a Singaporean, who did not suspect that Zunika was a woman.
Zunika, a Singaporean, told the woman that she was an Indonesian man. Some five months later, Zunika, using a dildo, started having sex with the woman twice a week.
To prevent the woman from finding out her secret, Zunika told her that according to Batak (an Indonesian ethnic group) culture, she should not touch or see the "penis". They later got married in Indonesia.
In 2007, Zunika met another woman, also a Singaporean, and they got married in Indonesia on Aug 24, 2008. The two marriages are now void, the court heard last December.
In 2011, Zunika met her victim, who was her neighbour.
Thinking Zunika was an Indonesian man, she frequently visited Zunika for chats in her flat. The pair soon developed feelings for each other.
On Jan 21, 2012, Zunika kissed the girl on her cheek for the first time in a taxi on their way to a family outing at Changi Beach. The following month, she took the girl, then 13, to her kitchen and kissed her on the lips.
She also removed the teenager's top and performed an obscene act on her.
In December 2013, Zunika felt guilty about the affair and decided to end it.
On March 21, 2014, the girl told her family members what Zunika had done to her, and she made a police report two days later. Zunika was later arrested.
Yesterday, Ms Nair told The New Paper after the landmark hearing that her client was very relieved to be acquitted of the sexual penetration charges.
She said Zunika was also sorry for her actions.
"She is going for gender reassignment surgery once she is done serving her eight-month term and reunite with her two wives. This time everything will be done legally," she said.
Under Syariah law, a Muslim man can marry up to four wives at one time.
Women jailed for penetration in UK, US
A woman who posed as a man online to dupe teen girls into having sex with her using a rubber penis was jailed for three years and three months in the United Kingdom last month.
Jennifer Staines, 23, admitted to four charges of sexual assault, two charges of assault by penetration and two charges of possession of an indecent photo, UK newspapers reported.
Staines groomed the girls, aged 12 to 17, over a period of five years.
To stop her victims from discovering the truth, Staines would not allow the girls to touch her body, though she could touch them.
In 2008, in the US state of New Jersey, a former school teacher who sexually assaulted her 14-year-old female student was jailed for 15 to 30 years.
The girl's parents had found lurid text messages from the teacher, Keri Ann Brekne, on a secret mobile phone.
The girl told police that Brekne had taken her across state lines to participate in sexual acts that began with kissing and touching, and progressed to oral sex, digital penetration and tying and blindfolding the girl in bed.
Brekne was also jailed seven years for several incidents that occurred in 2007, but the term was ordered to run concurrently with the other jail term.
This article was first published on April 13, 2016.
Get The New Paper for more stories.