Beijing (CNN) A court in central China on Wednesday ruled against a gay couple in the country's first same-sex marriage lawsuit, dealing a blow to a nascent but increasingly visible campaign for LGBT equality.

Sun Wenlin and his partner Hu Mingliang had sued their local marriage registry office after their application for a license was rejected last summer.

To the surprise of the couple and their lawyer, a district court in Changsha -- the provincial capital of Hunan -- accepted their case in January, allowing them to argue for their right to marry based on the lack of an explicit ban on same-sex marriage in China.

In dismissing the case this week, the court cited several provisions that specify genders of license applicants in the country's Marriage Law, which went into effect in 1981.

"This result shows that China still legally discriminates against gay people," Sun told CNN.

"We will appeal this decision and keep fighting for our rights."

JUST WATCHED Matchmaking for fake marriages Replay More Videos ... MUST WATCH Matchmaking for fake marriages 02:07

He added: "What we want is not just a sheet of paper or the recognition of some strangers -- this is about freedom and equality."

Shi Fulong, the couple's lawyer, said he was not surprised by the outcome but still felt "disappointed and saddened."

"The gay rights movement has gone from being underground to being in the open thanks to an increasingly tolerant public," he said.

"Things will be better as society becomes more open."

JUST WATCHED Fighting for gay rights in China Replay More Videos ... MUST WATCH Fighting for gay rights in China 03:07

Love and lawsuit

Sun and Hu applied for a marriage license on their first anniversary in June 2015, three days before the U.S. Supreme Court's decision to extend same-sex marriage rights across all 50 states.

When the registry denied their application, insisting only heterosexual couples could marry, the couple took their fight to court.

"Even if we were the only gay couple in the world, we should be allowed to marry," Sun told CNN in January.

"It's a basic human right and we ought to enjoy it."

Homosexuality was removed from an official list of mental illnesses for clinical treatment in China in 2001, following a 1997 decision to decriminalize it.

JUST WATCHED Are there gay rights in China? Replay More Videos ... MUST WATCH Are there gay rights in China? 01:49

'Not freaks'

Despite advances, social stigma remains.

According to a 2015 survey by U.S. research group Pew, 61% of China's population said that homosexuality was unacceptable.

No Asian nations are on the 22-strong list of countries that have legalized same-sex marriage.

Sun told CNN earlier that he hoped his court case would open a public debate about gay people and their interests and welfare in China.

But he admitted that China has a long way to go when it comes to equal treatment.

"My hope is that when people see gays or lesbians holding hands on the street, they wouldn't see them as freaks or curiously look back," he said. "We are just as normal as everybody else."