President Donald Trump confirmed Wednesday that his choice for secretary of state, Mike Pompeo, had visited North Korea recently for one-on-one talks with Kim Jong Un. But a review of Pompeo's comments over the past year shows he started sending messages to the North Korean leader long ago.

An NBC News review of Pompeo's public comments reveals a change in tenor from belligerence to diplomacy. Just three weeks before he left on his secret mission, he called Kim "a very young leader who is clearly in charge of his country."

John McLaughlin, the former acting and deputy director of the CIA, thinks that whether Pompeo is speaking to Congress or a think tank seminar or a Sunday morning talk show, his intended audience, particularly in recent days, has been Kim.

"[His] most recent remarks are meant as much for Kim's ears as for anyone else," said McLaughlin, now an NBC News analyst.

After becoming CIA director in January 2017, Pompeo, a former tea party Republican congressman from Kansas, quickly established a rapport with Trump. Both shared a propensity for less-than-diplomatic language.

Pompeo's first extended comment on Kim came at the Aspen Security Forum in late July 2017, a time when tensions between the U.S. and North Korea were high, with each side lobbing personal attacks and a flurry of threats. Pompeo told the audience that Trump had asked him to take the lead on North Korea, and then sparked controversy with an apparent call for regime change in Pyongyang.

"It would be a great thing to denuclearize the peninsula, to get those weapons off of that," said Pompeo, "but the thing that is most dangerous about it is the character who holds the control over them today. … I am hopeful we will find a way to separate that regime from this system," Pompeo added. "The North Korean people I'm sure are lovely people and would love to see him go."

McLaughlin thinks Pompeo has probably learned a lesson.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"You can see the shift in emphasis and something else: a growing awareness on Pompeo's part that what the CIA director says is widely analyzed and has impact for better or for worse; I'm not sure that as a former congressman he fully grasped that at the beginning, say in the Aspen talk."

Since Aspen, Pompeo has continued to suggest that the North's economic and political situation is deteriorating, but he's softened his rhetoric. And he's also inferred Kim may not know just how bad things are, that they yes-men around him are afraid to bring him bad news.

In January, speaking to the American Enterprise Institute, Pompeo made the first of several comments that Kim needs a better assessment of his country's increasingly dire situation.

Mike Pompeo met with Kim Jong Un in North Korea last week. Meeting went very smoothly and a good relationship was formed. Details of Summit are being worked out now. Denuclearization will be a great thing for World, but also for North Korea! — Donald J. Trump (@realDonaldTrump) April 18, 2018

"We're concerned that he may not be getting really good, accurate information. It is not a healthy thing to be a senior leader and bring bad news to Kim Jong Un. Tell someone you're going to do that, and try to get life insurance. I dare you."

"So we are doing — we're taking the real-world actions that we think will make unmistakable to Kim Jong Un that we are intent on denuclearization. We're counting on the fact that he'll see it. We're confident that he will. And then, we will continue to have discussions about how to achieve that denuclearization."

McLaughlin said the statements were a clear invitation to Kim.

"He's basically saying 'when you see me I'm going to lay it out for you in a way that others may not. And I speak for the president."

The CIA director had some subtle praise for Kim in a March Sunday morning appearance on FOX.

First, he noted that Kim had "committed to stopping nuclear testing, stopping missile tests, allowing exercises to go forward, something that has been incredibly contentious in the past and at the same time saying that the denuclearization — complete, verifiable, irreversible denuclearization as a topic for discussion."

"We know a fair amount about him," Pompeo said. "We know that he is rational in the sense of the response to stimulus. We have seen this. We've watched this administration apply pressure and now, we've watched him come to the negotiating table."

That same month, he praised the CIA's intelligence work on North Korea during an appearance on "Face the Nation" — comments that one former U.S. official said were part of his plan to establish the agency's primacy in dealing with the North.

"I had a chance this weekend to read the histories, the CIA's histories of our involvement in the previous failed negotiations," he told "Face the Nation" on March 11. "You can be sure that the CIA won't make those mistakes again. We will be at the center of providing the intelligence picture to the president and to the secretary of state so that each of them can understand how it is we can most likely achieve the president's objective."

With the agency role in place, Pompeo was ready to seize the moment when Trump tapped him as his choice for secretary of state two days later, and also accepted Kim's invitation to meet one-on-one.

McLaughlin said Pompeo's most important job in Pyongyang was to read Kim Jong Un's intent and assess him as a man: "Is he informed about the world? Does he understand what is happening to his economy? Does he understand the country's vulnerabilities?

"When [then-Secretary of State] Madeleine Albright came back from meeting Kim's father, Kim Jong Il, in 2000, she reported that he was well-informed about the world and was rational and that, however difficult it might be, we could talk to him, deal seriously with him.

"Pompeo has to make that determination about the son."

Pompeo, meanwhile, has to live down his comments at Aspen in 2017. During his Senate confirmation hearing, he insisted, on the record, "I have never advocated for regime change."