The Justice Ministry has issued a new guideline for handling prisoners with gender identity disorder that allows them to bathe alone and wear the underwear of the gender they identify with, sources said Saturday.

The guideline was issued after some prisoners who were born male but identify themselves as female, filed complaints about their treatment, prompting local bar associations to lobby the ministry and prisons to show more respect in protecting GID prisoners' human rights.

The ministry used to treat GID inmates like any others on the grounds that meeting the requests of specific inmates would invite criticism or allegations of discrimination from other inmates. But the ministry said it decided to show more sensitivity to GID prisoners as the condition has become more widely recognized.

Under the new guideline, prisoners with GID will continue to be detained in gender-segregated prisons according to the gender they were registered with at birth but can request a solitary cell and bathe alone. If they are male by registration but identify as female, they will be allowed to wear female underwear and have long hair, and vice-versa.

Although the GID inmates will not be able to receive sex-change operations or receive hormone treatments, they may consult psychiatrists or clinical psychotherapists while in prison, the guideline says. The ministry will also provide education for prison guards to raise awareness of GID and how to deal with GID inmates.

According to the ministry, about 40 prisoners in Japan, both male and female, were believed to have GID as of 2011 and eight have been diagnosed by doctors.