Gay couple Gordon Lake and Manuel Santos have won the custody of their one-year-old daughter, Carmen, who was born through a Thai surrogate, after more than a year of legal battle.

The 41-year-old American-Spanish pair, with Carmen and their 2-year-old son Álvaro, have been stuck in Bangkok, Thailand, since January 2015 because their Thai surrogate mother, Patidta Kusolsang, refused to sign the paperwork after she found out that Lake and Santos are a same-sex couple, and wanted to keep Carmen for herself.

In past interviews, Kusolsang was quoted saying that gay couples aren’t natural and can’t be good parents.

Yesterday, Bangkok’s Family Court ruled that the legal guardian of the child is Lake, her biological father from the U.S.

‘The court has granted legal custody of [the child] Carmen Lake to Gordon Lake, my client, and [said] that my client is her only guardian,’ said lawyer Rachapol Sirikulchit.

Legal consultants had previously commented that the case is especially complex, because even though Carmen was born before Thailand passed a ban on commercial surrogacy, the country’s legislation does not recognise same-sex marriages, and also considers the woman who gives birth to the child as its legal mother.

However, the egg came from an anonymous donor, not Kusolsang.

Sirikulchit believes that Carmen has the right to be with her biological parent, Lake, and has successfully convinced the court just that.

Walking out from the court, Santos was seen smiling and tearful.

‘We won,’ he told the journalists. ‘We are really happy… This nightmare is going to end soon.’

Love and truth won. Thank you Thailand! A photo posted by Twopapas (@twogaypapas) on Apr 26, 2016 at 12:52am PDT

On Facebook, Lake and Santos, shares their overwhelming joy and feeling of victory:

‘There is no way to express with words what we are feeling! We are crying, our family is crying, our friends are crying, and we are sure all the Thai people who showed their love for us during this time are crying too.

‘Today is a huge day for love, for family and for truth. And it is also a big day for LGBT rights.’

The couple say that the family will be moving back to Valencia, Spain, where they were living previously. They also reveal that they would be coming up with a tell-all book to share about this ‘crazy experience,’ including the ‘bad people’ and the ‘good ones.’

Lastly, the elated gay dads announced that their hashtag #bringcarmenhome shall be changed to #carmensgoinghome.