TAIWAN — Ellen Huang, 47, and Liyun Xiao, 40, have been together for 14 years. They found each other on social media, flew across the world to meet, and immediately fell in love. But love is rarely easy for same-sex couples in Asia.

The women had to invest the equivalent of $110,000 to immigrate to Canada in 2010 to get married legally. Neither Taiwan, where Huang is from, nor mainland China, where Xiao is from, recognized same-sex marriages at the time (mainland China still does not). They also had to find a sperm donor in the United States and go through in vitro fertilization for Huang to have their twins using Liyun’s eggs.

The couple decided to move back to Taiwan last year, so Huang could be closer to her aging parents, but despite having children together, Xiao could not stay in Taiwan permanently. At the time, Taiwan did not recognize their marriage, so Xiao had to leave every six months when her tourist visa expired, leaving their 3-year-old twins for Huang to take care of on her own.

Ellen Huang, Liyun Xiao and their twins. Courtesy of Ellen Huang

But on Friday, their wish finally came true — they can now legally register their marriage in Taiwan and enjoy almost all of the same rights as heterosexual couples.

“I’m very excited. Liyun can get married with me now and get Taiwanese residency. Our family can get protection in Taiwan,” Huang said. “We’ve waited for a long time.”

In a first for Asia, Taiwan’s Legislature voted overwhelmingly May 17 to legalize same-sex marriages and allow same-sex couples to adopt each other’s biological children, inherit each other’s assets and make medical decisions for each other.

The legislature’s decision came despite strong opposition from religious groups and parents who had insisted the law defining marriage as between a man and a woman must not be changed. Taiwan’s Constitutional Court had ruled in 2017 that the marriage law was unconstitutional and ordered the legislature to amend the law and allow same-sex marriages by May 24 — Friday.

Under the revised law, Xiao, the twins' biological mother, can finally be legally recognized as their mother.

“I feel more reassured, secure and protected,” Xiao said. She and Huang had long feared that if anything happened to Huang, Xiao would not be recognized as the children’s other parent.

Also getting some peace of mind is Taiwanese-American Jay Lin, 45, and his partner, Jona Chen. Lin is the founder of GagaOOlala, Asia's first and largest LGBTQ entertainment streaming platform. He often travels, so Chen is the main caretaker of their twins, who will turn 3 in June.

Since the twins were conceived with sperm from Lin and eggs from a Taiwanese donor, and carried to birth by a surrogate mother in Los Angeles, Chen has had no legal parental rights under the law. He is able to pick up the children from kindergarten and take them to medical appointments because of sympathetic doctors and teachers.

“It would give us a chance to finally create a legal family, and it allows my partner, Jona, the legal right to also adopt my two children,” Lin said of the marriage law going into effect Friday.

“He’s the one who quit his job to take care of the kids full-time,” Lin said of Chen. “Not that we needed a piece of paper to prove that we are one family, but that legal recognition gives us that added security, not just for him, but for me as well. If something happened to me, he knows what type of education, future we want for our kids. … And if major medical decisions need to be made when I’m not here, he can be the one to sign the papers without delay.”

Couples without children, especially those who are elderly, will also benefit from the revised law, because they will now be able to make medical decisions for each other and inherit joint assets without fear of legal challenges from their partner’s other family members.

Gay newlyweds walk on a giant rainbow flag at a pro same-sex marriage party after registering their marriage in Taipei, Taiwan May 24, 2019. Tyrone Siu / Reuters

Hundreds of gay families who had also been living in limbo began registering their marriages on Friday, including an estimated 20 couples who were among the first to do so Friday morning at a government office in the capital Taipei packed with domestic and foreign journalists there to cover the historic moment. Some of them had been together for years. They brought along the children they have been raising together and one couple even brought their pet dog with a rainbow ribbon tied around his neck. An outdoor party with speeches, wine and photo-taking was held afterwards. A mass wedding ceremony and banquet involving more than 20 couples is scheduled to be held outside the Presidential Office in Taipei on Saturday.

But not everyone is celebrating. Opponents to legalization had argued it would harm traditional marriage and family values and confuse young people, leading them to experiment with homosexuality.

The Coalition for the Happiness of Our Next Generation, which comprises mostly religious groups in Taiwan all opposed to same-sex marriage legalization, issued a statement calling May 17’s legislative vote “the darkest day in the history of Taiwan’s democracy.”

The coalition said the ruling Democratic Progressive Party (DPP), whose members have a majority of seats in the legislature and voted in favor of legalization, violated the results of referendums held last November. In those referendums, around 7 million Taiwanese voters favored reserving the country’s marriage law for protecting only heterosexual marriages, and instead creating a separate law to protect same-sex unions, not referring to them as marriages and not giving them the same rights as heterosexual marriages. Approximately 5 million Taiwanese voters supported full marriage equality for gay couples.

"This seriously violates the spirit of Referendum No. 10 and Referendum No. 12, and tramples on the public opinion of more than 7 million voters!” a statement released by the coalition read. “Who is the master of the country? Is it 15 [Constitutional Court] judges, or the people?”

The coalition plans to issue a list of legislators who voted in favor of same-sex marriage legalization and urge its supporters to teach them a lesson in the upcoming 2020 election. It also does not rule out proposing another referendum to knock down the same-sex marriage law.

Nonetheless, many people remain optimistic that what happened in Taiwan will not only lead to a better quality of life for LGBTQ people on the island, but also influence the rest of Asia.

“I hope there will a domino effect, especially for other countries in Asia,” Jennifer Lu, coordinator of the Marriage Equality Coalition Taiwan, told NBC News. “I believe once one country in this continent starts to move forward … other countries’ activists and civil society will think we can do that as well.”

“We are very happy to share our experience with other activists,” Lu added.

But the battle for equal rights is not over in Taiwan. The new law doesn’t allow same-sex couples to adopt nonbiological children, and since sperm and egg donation is illegal in Taiwan, along with surrogacy, couples still must go to countries like the U.S. or Canada for fertility treatment.

Many in Taiwan’s LGBTQ community believe more education is needed so that same-sex marriages are not just accepted by law, but by society as well.

Living in the rice-growing region of rural Taiwan’s Taitung County, Huang and Xiao are fully aware that traditional attitudes make many people unwilling to accept the existence of same-sex relationships.

“We’re low key, because of our family. My mom has accepted it, but my dad hasn’t,” Huang explained. “They get some pressure from my dad’s colleagues who tell my mom to not be so public and to not tell people of our relationship.”

“Liyun calls my mother and father ‘Godmother’ and ‘Godfather.’ In Chinese society, you can do something, but you can’t say you’re doing it,” Huang added.

They plan to register their marriage in a nearby city, instead of the small town in which they live.

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM