US President Donald Trump lashed out at the father of one of the three UCLA basketball players, who were arrested for shoplifting in China, and tweeted that he that he "should have left them in jail!" Twitter, on the other hand, has furiously hit back at the president's "selfish" comments.

In a series of tweets on Sunday, Trump wrote: "Now that the three basketball players are out of China and saved from years in jail, LaVar Ball, the father of LiAngelo, is unaccepting of what I did for his son and that shoplifting is no big deal. I should have left them in jail!"

He later tweeted: "Shoplifting is a very big deal in China, as it should be (5-10 years in jail), but not to father LaVar. Should have gotten his son out during my next trip to China instead. China told them why they were released. Very ungrateful!"

Trump's furious remarks came after LaVar Ball, the father of one of the arrested players, downplayed and questioned how instrumental the president was in getting the players released.

"Who?" Ball told ESPN when asked about Trump's role in getting the players home. "What was he over there for? Don't tell me nothing. Everybody wants to make it seem like he helped me out."

Ball is the CEO of the sports apparel company Big Baller Brand. His son, LiAngelo Ball, was arrested along with Cody Riley and Jalen Hill and accused of shoplifting from a Louis Vuitton store during the team's week-long trip to China.

Trump reportedly spoke to Chinese President Xi Jinping about resolving the issue. Trump took credit for the UCLA players' release in a tweet on Wednesday and asked whether they would express gratitude to them saying they were otherwise "headed for 10 years in jail."

The three players later apologised and thanked the president during a press conference last week. They have been suspended indefinitely from the UCLA team.

Trump's "petty" remarks on Sunday, however, immediately triggered furious reactions on Twitter with many slamming the president as a "small" and "childish" person.

Representative Adam Schiff, the top Democrat on the House Intelligence Committee, tweeted: "The President would have left American students in a foreign jail because their families didn't lavish sufficient praise on him. How can someone in such a big office be so small?"

"Wow, taking petty to new levels of low, huh?" one Twitter user wrote. A second chimed: "When he doesn't get the adulation he craves, he starts whining."

One person tweeted: "Donald Trump saying that he should have left LaVar Ball's son in jail simply because he didn't get a "Thank You" from him is the most childish and unpresidential thing I've ever heard. My 4 year old is a more developed human being than Donald Trump is!"

Many speculated that the feud is just getting started.

"In retrospect, this season of America was clearly building up to a LaVar Ball-Donald Trump ladder match in the season finale," Toronto Star reporter Daniel Dale tweeted.