The U.S. government Tuesday sought custody of a U.S. Marine convicted of rape in the Philippines, but Manila said a judge would have to decide.

The legal battle over custody and interpretations of a joint military pact that allows U.S. troops to train in the Southeast Asian nation took center stage a day after Lance Cpl. Daniel Smith, 21, of St. Louis, was convicted in the landmark case of raping a 23-year-old Filipino woman.

A visibly shaken Smith, who had been in U.S. Embassy custody during the duration of his trial, spent his first night in a Manila jail after being whisked away from the courtroom after his guilty verdict was announced.

The U.S. military is arguing they should have custody of Smith during the duration of his appeal. The Philippine Foreign Affairs Department said it received a note from the U.S. Embassy "reaffirming the right of the United States military authorities to exercise custody of any United States personnel over whom the Philippines is to exercise jurisdiction until completion of all judicial proceedings."

But the department added, "Mr. Smith may be transferred to the custody of United States authorities only upon the authority of the court."

Zosimo Paredes, head of the Philippines' Visiting Forces Agreement Commission, said the 1998 agreement between the U.S. and the island nation is clear in saying that after all appeals are exhausted, Smith will have to serve out his sentence in the Philippines. He faces a possible 40-year sentence.

It was less clear whether he should have been handed over to Philippine police while his appeal is pending.

A Philippines police official said it appeared there had been a misunderstanding after the judge ruled that he should be temporarily held in the Makati jail.

A scuffle briefly broke out in the courtroom Monday between U.S. Embassy security personnel and local police. After some pushing and shoving, Philippine police took hold of Smith and led him away in handcuffs.

One of Smith's lawyers, Benjamin Formoso, said the Marine "was in shock. He was crying yesterday when he talked to his parents."

Smith was confined in a room separate from other prisoners for security reasons, said warden Superintendent Delvic Oriero.

"He's still tense, he's hanging on," said Enrico Uyehara, a lawyer for one of the acquitted Marines who visited Smith.

The case has tested the joint military pact between the two countries that paved the way for U.S. counterterrorism training, which was credited with helping local forces make gains against Muslim extremists. But left-wing groups have staged regular protests outside the U.S. Embassy, claiming the American servicemen were getting special treatment, undercutting the country's sovereignty.

The rape victim accused Smith of sexually assaulting her while she was drunk on Nov. 1 last year, with three other Marines allegedly cheering him on.

Smith testified that the sex was consensual. The three other servicemen were acquitted Monday.