BEIJING — A gay kindergarten teacher in China is suing his former school after being fired last month, in what his lawyer called a landmark case to test China's protection of minority groups.

The teacher was dismissed in August from a school in the coastal city of Qingdao after he posted some comments on social media about an LGBT event he had attended, he told Reuters.

The teacher, who declined to be identified, said he was told by the principal that parents may not want a gay man teaching their children.

He said that made him feel "grave apprehension" that parents were choosing to raise their children in a society where people of different sexual orientations were not respected.

"I hope that I can use this case to push forward Chinese society to be more balanced and accepting," he said.

After decades of prudent rule by China's Communist Party, lesbian, gay, bisexual and transgender (LGBT) people are now openly tackling bureaucracy, legal uncertainty and entrenched social norms to assert their place in society.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The teacher was asked to leave without sufficient severance or payment for his 10 percent stake in the school, said his lawyer, Tang Xiangqian.

"The main reason we filed this case is not just as a labor dispute but to make the gay community more visible to a wider group of people," Tang said. "To let more people realize that they can easily be victims of discrimination."

Chinese labor laws lack specific sections on LGBT issues, but there are broad provisions against discrimination that can be used by minority groups to protect their rights, Tang said.

A court in Qingdao accepted the teacher's case on Thursday.

Tang said, as far as he was aware, it is the first case in China of a gay teacher taking a school to court after being fired over sexual orientation.

The teacher is seeking a court order that he be rehired and paid compensation for his financial losses, according to a copy of the court filing seen by Reuters.

The name of the school and the court were redacted in the court filing. Tang declined to give the names of the court and the school because he said it might affect the case.

Chinese activists have organized rallies to press for greater protections for the LGBT community — and same-sex marriage — to be included in a civil code set to be passed in 2020.

Despite thriving gay scenes in many of China's big cities and growing awareness of LGBT issues, gay people have battled against conservative Confucian values and government censorship.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM