The Indonesian government has posted an advert for a new youth ambassador position that orders members of the lesbian, gay, bisexual and transgender (LGBT) community not to apply.
The advert stipulates that the post is only open to applicants not involved in "sexually deviant behaviour".
It says this must be proven with a doctor's certificate.
Critics have accused the government in effect of destroying the futures of creative young LGBT people.
They have been barred from serving their country because of their sexuality, campaigners say.
Gay sex is not illegal in Indonesia, and the world's largest Muslim country has a vibrant transgender culture.
It is a tradition which is broadly met tolerantly by the Indonesian public.
But in recent months there has been a hardening of attitudes against the LGBT community from the political elite, the BBC's Rebecca Henschke in Jakarta says.
The job advert says the right candidate needs to be "someone physically and mentally healthy who is not involved in... LGBT [activities]".
A government minister told the BBC the rules were mainly targeted at transgender people because applicants needed to choose whether they were male or female - and that all youth ministry events now had the same rules.