(GIN) – In its second groundbreaking decision on gender identity, the Botswana courts have issued a ruling that acknowledges lesbian, gay, bisexual and transgender persons and their right to equal protection before the law.

The ruling echoes the so-called “bathroom bill” in the U.S. that would bar transgender students from bathrooms and locker rooms that did not match their biological sex.

In the case of ND vs the Attorney General of Botswana and others, the Lobatse High Court ordered the Registrar to change the gender marker on the identity card of a transgender man from female to male.

“For transgender persons throughout Africa, the road to obtaining an identity document that matches their expressed gender is literally impossible,” writes Tashwill Esterhuizen in the South African ‘Daily Maverick’ . “This exposes transgender people to ongoing stigma and discrimination and essentially denies their human dignity.”

“Judge Nthomiwa Nthomiwa observed: “Recognition of the applicant’s gender identity lies at the heart of his fundamental right to dignity. Gender identity constitutes the core of one’s sense of being and is an integral (part) of a person’s identity.

“Legal recognition of the applicant’s gender identity is therefore part of the right to dignity and freedom to express himself in a manner he feels … comfortable with.”

Esterhuizen, a lawyer with the Southern Africa Litigation Center, continued: “State (and society) have a duty to respect and uphold the individual right to human dignity despite opposing and different views it might hold with regards to the applicant’s gender identity.”

The High Court further noted with concern the ongoing distress and discomfort experienced by the applicant when he is required to explain intimate details of his life to strangers whenever he seeks to access routine services.

In the earlier case in March 2016, the Botswana Court of Appeal ordered the government to register a non-governmental organization that promotes the rights of the LGBT community in Botswana.

The Court of Appeal held that “as a society, once we recognize that persons who are gay, lesbian, bisexual, transgender or intersex are human beings… we must accord them the human rights which are guaranteed by the constitution to all persons, by virtue of their being human, in order to protect their dignity.”

In the U.S., the Supreme Court has decided not to rule on transgender rights, dealing a setback to rights advocates.