LiAngelo Ball and two other UCLA basketball players have finally been allowed to leave China after being accused of shoplifting while in Hangzhou, and ESPN host Tony Kornheiser thinks President Donald Trump is the one man the players need to thank for their freedom.

Kornheiser hit the air on Wednesday to note that Trump was the main reason that Ball, Cody Riley, and Jalen Hill were allowed to come home despite being charged with shoplifting. It is a crime that could have earned them a 10-year prison sentence in China.

According to Breitbart’s Charlie Spiering, Kornheiser said that Trump deserves the credit saying, “These players were extremely lucky, for the first time on this show we’re able to say President Trump had something to do with this.”

Indeed, it was reported on Tuesday that Trump personally interceded on the players’ behalf with Chinese President Xi Jinping when Trump was in China on a state visit.

“What they did was unfortunate,” Trump said of the players’ predicament. “You know, you’re talking about very long prison sentences. [In China] They do not play games.”

Only a day later, Chinese authorities allowed the three players to leave house arrest and fly back home to California.

The president apparently also wonders if the players will thank him for his efforts to convince Chinese authorities to release them. On Wednesday, the president jumped to his always churning Twitter account to say, “Do you think the three UCLA Basketball Players will say thank you President Trump? They were headed for 10 years in jail!”

Kornheiser, who is no fan of Donald Trump, has sparked controversies of his own in the past. Back in 2010, for instance, he was suspended for two weeks after making untoward comments about Hannah Storm’s wardrobe calling her clothing “a horrifying, horrifying outfit.”

Follow Warner Todd Huston on Twitter @warnerthuston.