SINGAPORE — Singapore's high court on Monday allowed a gay doctor to adopt his biological son, a landmark ruling in the socially conservative city-state that comes almost a year after his initial bid was rejected.

The decision overturns a 2017 ruling in which a court said the man could not adopt the boy because he was born by a surrogate in the United States through in-vitro fertilization — a procedure not available to unmarried couples in Singapore.

The ruling also comes amid a renewed public push to review Singapore's colonial-era law under which sex between consenting males carries a maximum penalty of two years in jail, after a repeal of a similar law in India this year.

"We attribute significant weight to the concern not to violate the public policy against the formation of same-sex family units on account of its rational connection to the present dispute and the degree to which this policy would be violated should an adoption order be made," chief justice Sundaresh Menon said.

"However...we think that neither of these reasons is sufficiently powerful to enable us to ignore the statutory imperative to promote the welfare of the child."

The man, in a relationship with a same-sex partner, paid $200,000 for a woman to carry his child through in-vitro fertilization in the United States after he had learned he was unlikely to be able to adopt a child in Singapore as a gay man.

The district court which initially rejected the application in December 2017 said that the man had attempted to walk "through the back door of the system when the front door was firmly shut."

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM