However six days later, the girl's mother changed her mind about the adoption, although the child has continued to live with the Tomases.
Justice Ian Loughnan said the passport, which allowed an Australian visa to be issued was "itself falsely and possibly, unlawfully obtained".
"There is an argument that the proceedings are an abuse of process and as I understand the argument, that arises in part because conduct of parties was in breach of Australian and or New Zealand law. The argument goes that the New Zealand passport relied on to allow the child entry to Australia was obtained by fraud and that because the child's adoption did not meet the requirements for recognition in NSW, it was illegal."
"The devices employed by the Tomases could lead to child smuggling and trafficking into Australia," he said.
The court ruled S should be returned to Ms Murray and taken back to Samoa.
Associate Professor Jennifer Burn from the faculty of law at the University of Technology Sydney, told the Sydney Morning Herald the case raised issues about the entry of children into Australia.
Burn said there should be ''greater scrutiny [of overseas adoptions cases] to ensure that the birth parent freely, without coercion, and in the absence of fraud or any other form of malpractice, surrenders the child for adoption''.