President Trump said Sunday he “should have left” three UCLA basketball players “in jail” after the father of one of the hoopsters implied he had nothing to do with getting the trio released from shoplifting charges in China.

“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!​” ​Trump railed on Twitter Sunday.

​The three UCLA Bruins — freshmen LiAngelo Ball, Cody Riley and Jalen Hill​ ​— were ​held by Chinese authorities at their team hotel in Hangzhou after being ​arrested​ ​​earlier this month for allegedly stealing sunglasses from a Louis Vuitton store.

T​rump, who arrived in China as part of a 12-day trip through five Asian nations after they were detained, said he personally asked Chinese President Xi Jinping to get involved.

But LaVar Ball told ESPN he doubted that Trump played a role in the release ​last week ​of his son and his two UCLA teammates.

“Who?” ​he ​told the sports network when asked about Trump. “What was he over there for? Don’t tell me nothing. Everybody wants to make it seem like he helped me out.”

Hours after news outlets reported on Trump’s tweet, he took to the social messaging site again to blast the “ungrateful” father.

​​”Shoplifting is a very big deal in China, as it should be (5-10 years in jail), but not to father LaVar,” Trump wrote shortly before 7 pm. “Should have gotten his son out during my next trip to China instead. China told them why they were released. Very ungrateful!”

Last Tuesday, even before the announcement that the three athletes were released, Trump was touting his intercession with Xi as a diplomatic breakthrough.

“He was terrific, and they’re working on it right now,” Trump said of Xi aboard Air Force One.

Last Wednesday, Trump used his Twitter feed to coax a public shout-out from Ball, Riley and Hill before they held a news conference on campus after their return to Los Angeles, reminding them that they “were heading for 10 years in jail!”

And he got the recognition he sought.

“I would like to thank President Trump and the United States government for the help they provided,” said Ball, the brother of Los Angeles Lakers rookie Lonzo Ball. ​

Later, ​Trump acknowledged his appreciation and offered ​some fatherly advice.

“​You’re welcome, go out and give a big Thank You to President Xi Jinping of China who made​ your release possible and, HAVE A GREAT LIFE! Be careful, there are many pitfalls on the long and winding road of life!​” he crowed to his 43 million Twitter followers. ​

But the elder Ball shrugged off the seriousness of the situation​ involving his son.​

“A lot of people like to say a lot of things that they thought happened over there,” he ​told ESPN​. “Like I told him, ‘They try to make a big deal out of nothing sometimes.’ I’m from LA. I’ve seen a lot worse things happen than a guy taking some glasses.”

With Wires​