Three UCLA basketball players detained in China on suspicion of shoplifting were headed back to the United States on Tuesday after President Donald Trump said he had sought the help of Chinese President Xi Jinping in the case.

Staff for Delta Air Lines confirmed that the players - freshmen LiAngelo Ball, Cody Riley and Jalen Hill - had boarded a Delta flight from Shanghai to Los Angeles.

"What they did was unfortunate," Trump told reporters earlier in Manila. He said the trio, who have been held since last week, could have faced long prison sentences, and described Xi's response as "terrific."

"They're working on it right now," Trump said.

Trump had raised the issue with Xi during a dinner held during the U.S. leader's Nov. 8 to 10 state visit to Beijing. Trump was in the Philippines capital for a summit of Asian leaders.

Asked about the trio and Trump's discussing the issue with Xi, China Foreign Ministry spokesman Geng Shuang told a daily news briefing in Beijing: "Until now, I have not received any update, so I am unable to provide any further information."

The three basketball players from the University of California, Los Angeles (UCLA) were detained by police on Nov. 7 in the eastern Chinese city of Hangzhou over allegations of shoplifting. They were not on the team's return flight to the United States on Saturday.

A senior White House official said the players had been given relatively light treatment due to Trump's intervention.

"It's in large part because the president brought it up," the official told Reuters.

The UCLA team had been in China for a game against Georgia Tech in Shanghai on Saturday, which UCLA won 63-60. The teams had travelled to Hangzhou earlier in the week to visit the headquarters of the game's sponsor, Chinese tech giant Alibaba Group Holding Ltd.

The three students were taken in for questioning by police about alleged shoplifting from a Louis Vuitton store during the Hangzhou visit.

They were released from police custody early on Wednesday and had been confined to a luxury hotel in Hangzhou pending legal proceedings, sources familiar with the matter told Reuters.