The gay and transgender community will no longer be viewed as mentally ill by the Thai military, but are still unfit for service, a court has ruled.

The country’s Central Administration Court made the decision after transsexual Samart Meecharoen complained about the policy claiming it incites discrimination and hatred.

Major General Phichai Pinsaikhaew said: “The military does not mean to discriminate against these people or violate their human rights but we are trying to find the word to show that they are not fit to serve in the military.”

Gay and transgender people will now instead be listed as “suffering from sexual identity problems” by the service, the Associated Press reports.

Military service is compulsory in Thailand for men over 20, but first they must be deemd physically and mentally fit.

Thailand is considered to be quite tolerant of homosexuality and transsexuality

Homosexuality was decriminalised in the country in 1956 and removed from a list of mental disorders by Thai law in 2002.