The US embassy said Judge Benjamin Pozon’s decision "reflects a misunderstanding of the nature of Philippine obligations" under the Visiting Forces Agreement (VFA).
It said Smith is not a private citizen but a member of the US military on an official mission in the Philippines, "and therefore the handling of his case is subject to the terms of the VFA'.
But Pozon said the provision of the bilateral military pact no longer applies to Smith and ordered Smith to remain in Philippine custody.
The judge said it was Raul Gonzales, the Philippine justice secretary, and Jovencito Zuno, the chief state prosecutor, who violated the treaty when they made an agreement with the US ambassador to return Smith to her custody.
"Neither Gonzalez nor Zuno is the appropriate Philippine authority who can legally enter into such an agreement," Pozon said.
He added that the treaty also stated any US soldier convicted of a crime within the country should be confined to a Philippine-run facility. Smith's lawyer, Jose Justiniano, said he would file a motion on Thursday with the Court of Appeals seeking to overturn the judge's decision.