The couple came out through an art exhibition (heng yirui/facebook)

The grandson of Singapore’s first prime minister has come out as gay.

Li Huanwu, who is also the nephew of current Prime Minister Lee Hsien Loong, broke the news through Out in Singapore, an exhibition for “LGBTQ persons who wish to come out to family, friends and peers in the community.”

Huanwu and his partner Yirui Heng made the announcement ahead of Singapore’s Pink Dot Pride event, which last year attracted thousands despite government restrictions.

Gay sex is illegal in the country and LGBT content in cultural creations is still seen in a negative light by authorities, who gave teen rom-com Love, Simon a 21 rating earlier this year.

Huanwu, 31, changed his profile picture on Facebook to a photo of him and Heng, a 27-year-old veterinarian, after they were pictured together in the exhibition earlier this month.

He has been vocal in urging Singaporeans to attend Pink Dot, writing last year: “If you are a straight ally, I implore you to come stand in solidarity.

“For the LGBT community, it is but a dream to share in the same human dignities as you, to live full and proper lives. Your support is needed to live that dream. Please stand with us.

“If you’re a closeted member of the LGBT community, I also urge you to come. I hope that you will look past the security barricades and ID checks and see – if only for an afternoon – that there is more to life than the darkness of the closet, that there are people out there who care.

He added: “Finally, if you’re an out member of the LGBT community, you have a moral responsibility to come. If you do not stand up yourself, you cannot expect others to fight for you. This is your moral duty.”

Last week, he took on a more cheerful tone, but remained insistent that everyone should attend. He wrote:

“No call to social action this year – I’ll be more selfish: it’s the day before my birthday (it’s also the day after Magnus’ birthday).

“Be there. (And grab a drink when you stop by.)”

Lee Kuan Yew, Singapore’s founding father and Huanwu’s grandfather, was consistently supportive of gay people.

In 2007, he said: “This business of homosexuality. It raises tempers all over the world, and even in America.

“If in fact it is true, and I’ve asked doctors this, that you are genetically born a homosexual, because that is the nature of genetic random transmission of genes, you can’t help it. So why should we criminalise it?

“But there is such a strong inhibition in all societies – Christianity, Islam, even the Hindu, Chinese societies. And we’re now confronted with a persisiting aberration, but is it an aberration?

“It’s a genetic variation,” he insisted. “So what do we do? I think we pragmatically adjust.”

Earlier this year, a Singaporean lesbian couple won the right to appeal after their marriage was voided because one of the women underwent gender confirmation surgery.