President Donald Trump insulted Rep. Mark Sanford during a closed-door meeting with Republicans on Tuesday.

The insult was met with booing from a few GOP lawmakers who are close with the South Carolina Republican.

Trump claimed on Twitter the following day that his insult was actually met with laughter and applause.

WASHINGTON — During a closed-door meeting between House Republicans and President Donald Trump on Tuesday night in the US Capitol, the president veered off topic from the heated immigration discussions to insult Rep. Mark Sanford, a frequent White House critic.

According to a Republican in the room, Trump barbed Sanford for losing his South Carolina primary election earlier this month.

"I want to congratulate him on running a great race!" Trump said. When the joke was met with awkward stares, Trump called Sanford a "nasty guy."

The remarks about Sanford, who was not among the nearly 200 Republicans present, was met with a handful of boos from the conservative lawmaker's colleagues.

The next day, after several reporters noted that Trump was booed by Republican lawmakers, the president claimed on Twitter that his joke was met with rousing laughter and applause.

"Had a great meeting with the House GOP last night at the Capitol," Trump wrote on Twitter. "They applauded and laughed loudly when I mentioned my experience with Mark Sanford. I have never been a fan of his!"

Sanford responded to Trump's insult, telling The Washington Post that it was emblematic of the problems he had faced with Trump for some time.

"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," he said. "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 lost his primary race earlier in June to State Rep. Katie Arrington. On Election Day, Trump endorsed Arrington and urged voters to reject Sanford as "MIA and nothing but trouble."