WASHINGTON — President Donald Trump on Tuesday appeared to congratulate his Secretary of State, Mike Pompeo, for shouting and cursing at a reporter for National Public Radio who had asked Pompeo questions about Ukraine.

Trump made the remarks during a White House event to unveil a Middle East peace plan. After thanking Pompeo for his work, Trump was surprised when Pompeo received a standing ovation from the room full of guests.

"Oh, that's impressive. That was very impressive, Mike," Trump said of the applause. "That reporter couldn't have done too good a job on you yesterday, huh? Think you did a good job on her, actually. That's good. Thank you, Mike. Great. Are you running for Senate? I guess the answer's no, after that."

Pompeo had long been considering a run for Senate in his home state of Kansas, and Trump's comments drew laughter from the audience.

Beyond the White House, however, Pompeo's decision to call NPR's Mary Louise Kelly into a private room at the State Department on Friday to yell at her has been condemned by journalists and news organizations.

"This is an attack on news organizations from the top US diplomat, someone who is supposed to defend press freedoms. It's obvious he's playing to an audience of one — Trump," New York Times diplomatic correspondent Edward Wong posted on Twitter.

The incident took place on Friday, after Kelly pressed Pompeo in an interview about why he had not defended Marie Yovanovitch, the former U.S. ambassador to Ukraine, who was abruptly pulled from her post last spring. Trump's removal of Yovanovitch is now a central issue in his impeachment trial, part of a pattern, Democrats say, of Trump clearing the way for a pressure campaign to force the U.S. ally to investigate his political rivals.

After the Friday interview, Kelly said an aide to Pompeo called her to his private living room.

"I was taken to the Secretary's private living room, where he was waiting, and where he shouted at me for about the same amount of time as the interview itself had lasted," Kelly told NPR later that day.

"He asked, 'Do you think Americans care about Ukraine?' He used the F-word in that sentence and many others," Kelly said. "He asked if I could find Ukraine on a map. I said yes. He called out for his aides to bring him a map of the world with no writing, no countries marked."

"I pointed to Ukraine," she said. "He put the map away. He said, 'People will hear about this,' and then he turned and said he had things to do, and I thanked him again for his time and left."

Pompeo later falsely accused Kelly of having agreed before the interview with Pompeo not to ask him questions about Ukraine. "It is shameful that this reporter chose to violate the basic rules of journalism and decency," Pompeo said in a statement. "This is another example of how unhinged the media has become in its quest to hurt President Trump and this Administration."

Trump has made his disdain and distrust of the mainstream media a central part of his presidency, accusing the press repeatedly of being the "enemy of the people."

— CNBC's Kevin Breuninger contributed to this report.