Kathmandu, Nepal (CNN) -- When census gatherers went door-to-door visiting 5.6 million households across Nepal this month, they collected information not only on the country's men and women, but also on a so-called third gender.

In what is believed to be a world first, Nepal's Central Bureau of Statistics is giving official recognition to gay and transgender people -- a move seen as major victory for equality in a country that only decriminalized homosexual relationships three years ago.

Among those happy to stand up and be counted in the third gender category is Dilu Buduja, 35. "I was born as a girl, but as I grew up I felt I was a boy. Today I totally feel like a man," he said.

A spokesman for the statistics bureau, Bikash Bista, said the new categorization was an attempt to open up the traditionally conservative country up to different points of view.

But the state's recognition of the rights of gender minorities, gays and lesbians has not come without a fight.

"We had to put in a lot of pressure to have the third gender counted in the census," said gender minority rights activist Sunil Babu Pant.

"It was only after we said that we would go to court that the officials agreed to include the third gender as a category."

If the case had gone to court, it would likely have been upheld thanks to a landmark 2007 Supreme Court ruling that directed the state to end discrimination based on sexual orientation and gender identity and decriminalize "unnatural sex."

It also decreed the issue of citizenship certificates that clearly indicate an individual's choice of gender identity.

Citizenship certificates, which work as national identity papers, are needed in Nepal to open a bank account, own property, secure a job and get a passport among other things.

"The court also directed the government to form a committee to study what kind of laws can be made for same-sex marriage or civil union," said Hari Phuyal, a human rights lawyer who made the lead argument in the case.

"Nepal's 2007 ruling was an inspiration to even India and the ruling document was studied by the Delhi High Court [of India ] when it decriminalized sodomy last year," he said.

Pant, Nepal's first openly gay lawmaker, described the ruling as "very satisfying," but said its implementation was an "extremely slow and painful process."

His claim is underscored by the fact that Nepal 's Ministry of Home Affairs is yet to direct the country's 75 administrative districts to issue citizenship certificates that indicate gender identity.

"Local authorities did not know about third gender and they were afraid that they would lose their jobs if they gave such a citizenship," said Buduja, who last month became only the second person in the country to obtain a citizenship certificate indicating gender.

Pradeep Khadka, of sexual and gender minority rights advocacy group Blue Diamond Society -- founded by Pant nearly a decade ago -- say delays in fully enforcing the 2007 ruling represent a struggle between conservative and liberal elements in Nepalese society.

Though discrimination persists, there is progress. The government is also finalizing a list of discriminatory laws that need to be changed so that gender minorities can enjoy the same rights as others, including inheritance rights.

Two years ago it also formed a committee to make recommendations on legislation governing same-sex marriage or civil union. It is in the final stages of the completing the report.

"We visited several districts in the country and Norway to look at its experience and use it as a case study," said sociologist Chaitanya Mishra, a member of the recommendation committee.

According to another member of the committee, it will recommend that the government legalize same-sex marriage, which would be a first in South Asia.

"There are 50 to 60 couples waiting to get married on the day same-sex marriage is legalized," said Buduja, who is among those hoping to tie the knot.

But activists say, reluctance among officials to issue the sexuality-specific citizenship certificates means that day may be far away. And without the certificates, many may be reluctant to disclose sexuality to census gatherers.

"But this is an encouraging step forward," Pant said.