Rep. Mark Sanford was at the airport in Charleston, S.C., for four hours of “airplane hell” when President Trump veered from his speech on immigration to the South Carolina Republican.

“I want to congratulate him on running a great race!” Trump said sarcastically, to awkward silence from more than 200 of his Republican colleagues.

Hearing silence from the room, Trump then piled on and said, “What, nobody gets it,” and added that Sanford is a “nasty guy.” There were boos — a rarity for Trump in a room where he is largely loved.

The president’s remarks to Republicans on Capitol Hill were designed to assuage lawmakers on immigration, as his administration separates children from their parents at the border and lawmakers puzzle over the president’s shifting words on the issue. By saying he supported the compromise bill, a fierce effort from the office of House Speaker Paul D. Ryan (R-Wis.), and urging lawmakers to vote for it, the president calmed the waters somewhat in a fraught vote-whipping process. Aides still said they feared they would not be able to secure the necessary 218 votes.

“I am behind you so much,” Trump said, according to two attendees. He said on several occasions that the border wall was greatly needed.

Rep. Chris Collins (R-N.Y.) said that heartened many who were concerned that Trump would request changes. Trump sent the Hill into a tailspin Friday morning by saying he would not sign an immigration bill, but aides later said he was confused by the question.

“He did not call for any changes to it,” Collins said. “Anyone who was in that room knows the president is behind the bill.”

But the president showed more enthusiasm for touting his summit in North Korea, marveling at his rising poll numbers and excoriating Sanford, who was not in the room. Trump had attacked Sanford via Twitter last week, even bringing up the congressman’s famed extramarital affair while he was his state’s governor, and took joy when Katie Arrington, a Trump supporter, beat Sanford in the Republican primary. Sanford, a longtime conservative who has attacked Trump for not telling the truth and not espousing conservative principles, has grated on Trump.

“I would say the comment goes to the core of why I have at times agreed with policies of the administration but at the same time found the president’s personal style so caustic and counterproductive,” Sanford said in an interview with The Washington Post. “The tragedy of the Trump presidency is that he thinks it’s about him. The president has taken those earnest beliefs by so many people across the country and has unfortunately fallen prey to thinking it’s about him.”

Sanford said he was heartened that members in the room booed the president and said it was a “biased, demeaning and pejorative comment.”

“You have really big issues happening, and in that context, the president felt it was necessary to take time to say something pejorative about some member of Congress,” he said. “You have that environment, with so many important policies to be discussed, and the president takes time to do that. It is symptomatic [of] how far this administration has drifted from important ideas and policy that really impact people’s lives.”

Trump, who limited his remarks to about 20 minutes, veered from his script to the usual potpourri of topics, according to attendees. He began the meeting by citing the pictures of children in cages along the Mexican border and said it was a “dangerous issue” for the GOP, two attendees said, calling the pictures “bad for us.” Trump said his daughter Ivanka Trump had talked about the issue with him, according to two attendees. The White House did not respond to two requests for comment Tuesday on Ivanka Trump’s opinion on the policy.

But he soon veered into his prowess in negotiating fighter jet contracts, even ticking off specific planes such as the F-35, what he sees as a vast imbalance on trade and the administration’s tax cuts. Trump tried to reassure the Republican members on trade — many have questioned his tariffs — by urging them to have faith in his negotiating skills.

“Biggest tax cuts ever,” Trump said to the room, even though they are not the biggest tax cuts ever. He asked Rep. Jim Jordan (R-Ohio) to stand up for praise and said he was defending him on TV. “Where’s my Peter?” Trump said, referring to Rep. Peter T. King (R-N.Y.).

He said the North Koreans had assured him they would not use nuclear weapons. “They are going to denuclearize,” he said with supreme confidence, unlike the assessment of many of his aides and experts. Trump said that Democrats and Republicans wanted him to trash Kim Jong Un but that he did not plan to do it because it was not his form of “manners,” one attendee said. He said it would damage his relationship and attacked the news media for their criticisms of the North Korean leader, who has engineered the killings of family members and starved his people.

He bragged about his poll numbers at one point, two attendees said. “We’re hot,” Trump said, describing his poll numbers. “We’re doing well.”

Trump asked the room whose idea it was to combine money for the border wall — for which he demanded $25 billion — with fixing DACA. He was told it was Rep. Mario Diaz-Balart (R-Fla.) and the president responded: “I like him better than his brother.” It wasn’t clear whom the president was referring to. One of Diaz-Balart’s brothers, Lincoln, is a former member of Congress.

The president was at the Trump International Hotel in Washington by Tuesday night, speaking to donors to a leadership summit of his America First Action super PAC. Donors needed to pay $100,000 to attend, according to Politico.

At the Capitol Hill meeting, Trump did not take questions from the lawmakers. Sanford said he does not know what he would have said had he been in the room — and is not exactly sure why Trump remains angry at him even after he lost. The congressman has been told by a number of people, including Ryan, White House budget director Mick Mulvaney and Sen. Lindsey O. Graham (R-S.C.), that Trump doesn’t like him, according to a person familiar with the relationship who spoke on the condition of anonymity. But Trump has never said it himself — and seems fixated on Sanford’s comments in the media.

“I have no clue,” Sanford said, laughing.