A Tokyo court on Thursday ordered the Japanese government to pay compensation to a transgender official who was refused use of the women's bathroom at work.

"The Tokyo district court ordered the accused to pay 1.3 million yen ($12,000) in damages," a court spokesman told AFP.

"The court also ordered the government to let the official use the women's bathroom freely, by removing the requirement that she notify female employees she is transgender," the spokesman said.

The official who joined the Ministry of Economy, Trade and Industry as a man and now lives as a woman filed suit in 2015, demanding 16.5 million yen in damages over claims she was banned from using the women's bathroom, local media said.

There are no reliable global statistics on the number of people who identify as transgender
There are no reliable global statistics on the number of people who identify as transgender AFP / JUNG Yeon-Je

It is believed to be Japan's first case involving damages over the work environment for transgender people.

The government reportedly argued that it limited the official's use of the women's bathroom because it "could not set aside concerns she could harm female staff."

Presiding judge Takeshi Ebara said the ministry's decision "was extremely lacking in validity," according to the Mainichi Shimbun daily.

The judge also said that a comment by the official's boss suggesting she should revert to a male gender identity "exceeds the limit allowed by the law."