I have difficulty with the fatwa issued by Sayed Sistani, Sayed Ali Khamenei and Sayed Khomeini (ra) regarding transexuality. I know it has to be prescribed by a doctor and a psychologist but I don’t know more. Is it based on hadiths? If not, what did they base their fatwas on and can you explain these fatwas clearly to me.

I do not understand why you find it difficult to accept the fatwa on changing the sex of the hermaphrodite, as it is a normal fatwa derived from the scientific and medical development taking place in our time, which did not exist in the past.

We have two types of hermaphrodite:
1- Simple hermaphrodites: She who has visible male organs and atrophied female organs , or vice versa. An operation is performed to remove the atrophic organs, and hormones are given to strengthen the desired side, whether male or female.

2- Complex hermaphrodites: She is the one who has male and female organs integrated together, so she is given a choice between the two sexes.

If she chooses to be male, she will have operations to remove the female organs, and she will be given male hormones, and vice versa.
We can find references to these matters in the narratives, but these operations were not possible in the past.