President Trump said Friday he’d had dinner with the family of college student Otto Warmbier, who died when he returned to the US after being tortured in a North Korean prison — and suggested that President Obama should have moved faster to win his release.

“I had dinner the other night with the Warmbier family, an incredible family. The whole family and some of Otto’s friends in addition to the family. We had 25 people over on Saturday night. We did that dinner in Otto’s honor, and it was a beautiful thing,” the president said at the White House.

“I will tell you that people should have moved faster. I actually work hard on hostages, I think you would say. I think most presidents wouldn’t do that, but I do,” he in a dig at his predecessor, whom he did not mention by name.

Trump’s comments came as he was praising new National Security Advisor Robert O’Brien’s hostage negotiating skills.

Warmbier, a college student from Wyoming, Ohio, was arrested in January 2016 at Pyongyang International Airport while waiting for a flight home from the Hermit Kingdom.

He was accused of trying to steal a propaganda poster from his hotel, and was sentenced to 15 years’ imprisonment with hard labor.

He was brought home in June 2017, but died days later at the age of 22.

In his remarks, Trump cited the necessity of speedy negotiations to free hostages.

“Speed is a very important thing, I find, with hostages. It’s really something. With hostages, you have to move fast. All of a sudden it gets very hard for the other side to do anything, and sometimes it’s just too late,” he said.

“In the case of Otto, it was very late. We got him home but he was in horrible, horrible condition. What happened to him was actually incredible, just horrible. But you have to move fast.”

The president’s relationship with the Warmbiers wasn’t always so friendly.

In May, Warmbier’s mother Cindy Warmbier called the country a “cancer” — and slammed the Trump administration’s diplomacy with dictator Kim Jong Un as a “charade.”

“Unless we keep the pressure on North Korea, they are not going to change. I’m very afraid we are going to let up on this pressure,” she said at an event in Washington, DC.

“North Korea, to me, is a cancer on the Earth. If we ignore this cancer, it’s not going to go away, it’s going to kill all of us.”