The imposing new courthouse for juvenile and family affairs in northern Bangkok was the setting last week for the final ruling in one of the strangest custody cases to emerge from the moral maze of Asia's thriving surrogacy business.
At stake was the future for 13 young children, taken into state care as infants in August 2014, after they were discovered being looked after by nannies in a Bangkok apartment.
At the time the authorities were investigating fertility clinics in Bangkok believed to be offering commercial surrogacy services - paying Thai women to give birth to babies for mainly foreign clients.
This was in response to a Thai surrogate mother complaining that an Australian couple had refused to take one of the twins she had carried for them because he was born with Down's syndrome, a boy she called Gammy.
At least nine clinics were raided. One clinic, which was called All-IVF, was shut down.
The 13 children had been conceived under the supervision of Dr Pisit Tantiwattanakul, who ran All-IVF. It turned out that all of them been fathered by then-24 year-old Mitsutoki Shigeta, a Japanese man who had already left Thailand, and who, from Japan, provided DNA samples to prove his paternity of the remaining 13.
That a young, secretive and single man would want so many babies raised immediate concern over his motives.
The Thai police began investigating Mr Shigeta for possible human trafficking. The surrogacy agent he had first used, the Georgia-based New Life, headed by Mariam Kukunashvili, stopped dealing with him when he told her how many children he planned to father.
"Mr Shigeta first contacted us for surrogacy in 2011", she told the BBC. "Initially he chose two surrogate mothers, and both became pregnant right away. After that he informed us he wanted more than 1,000 babies, and planned 10-20 surrogacies every year, or more.
"He said he had ten passports, and could register the babies through different embassies. We became very worried about the wellbeing of the babies, and we suspected baby trafficking."
Mr Shigeta's lawyer in Thailand explained that his client simply wanted a large family. As the eldest son of a Japanese tech billionaire, he said, there would be no problem looking after the children properly. But his true reasons for wanting so many children, using surrogates, remain a mystery.
The Thai authorities have since identified two children in Cambodia and four in Japan already fathered by Mr Shigeta. Now, after more than three years, the court has awarded him custody of the remaining 13, who have been living in a state children's home. Mr Shigeta has not come back to Thailand to visit them, perhaps fearing either the publicity or possible prosecution, but Thai officials say his mother has visited them every two months.
The court ruled that as Mr Shigeta was the biological father of the children, that there was no evidence of ill-intent or trafficking, nor of a criminal record, and that the surrogate mothers had made no claim to them, it could find no reason not to award him custody. It found that he had established bank accounts specifically for them in Singapore, had paid for helpers to assist in looking after them, and was preparing a home for them in Japan, along with schooling.
He has also bought a property in Thailand in which to look after the children during a planned transition period, where they will get to know the nannies who will care for them in Japan. Thai officials who visited Japan say they were reassured by the evident affection his four children already living there showed for him. They say they will continue to monitor the 13 who are expected to move to Japan in the near future.
The court did not address Mr Shigeta's strange ambition to have hundreds of children, but did say that in considering the interests of the children above everything else, it believed they would be better under the care of a wealthy and apparently conscientious father, than in state care in Thailand.
In 2015, Thailand passed a new law strictly limiting surrogacy to Thai couples, and banning commercial surrogacy altogether - offenders face up to 10 years in prison. The business then moved over the border to Cambodia for a while, but in 2016 that country also outlawed the business. Now it has largely moved to Laos, where there is as yet no specific regulation for surrogacy.
But the lucrative practice has not died in Thailand. As a regional transport hub, with excellent medical skills and facilities, Thailand is still an ideal location for people to seek surrogacy services, even if the impregnation of surrogates cannot be legally done inside the country.
Evidence of cross-border surrogacy appeared last year when a man was detained in April carrying six vials of frozen sperm across the border to Laos. A month later six Thai women were also detained at the border, as the authorities found out they had been contracted to be surrogate mothers in Laos.
Websites offering fertility services state that much of the initial process of obtaining eggs from donors and then fertilising them can be done in Bangkok's experienced clinics, before transporting the embryo to Laos to be implanted in the surrogate.
At some point Laos too will probably tighten its regulations. But the yearning for children in those who cannot conceive naturally, and the globalisation of the "wombs-for-rent" business, makes it inevitable that when that happens it will simply move to another poor country.
And 19 children, all close in age, will now find themselves being brought up by a publicity-shy, 28-year-old Japanese man, with the assistance of his mother and an army of paid helpers. By all accounts they will want for nothing, materially, but Mariam Kukunashvili has concerns over the emotional aspects of such an unconventional family.
"Ethically, we don't understand how one can share love, time and attention among 300 or 1000 babies. Sometimes wealthy people with no parental experience assume that bringing up children just means hiring dozens of nannies, and paying bills.
"You cannot outsource parenthood entirely to nannies, as this can cause psychological problems in the children and adults."