CIA Director Mike Pompeo made a top-secret visit to North Korea as an envoy for President Trump to meet with Kim Jong Un, and plans for a possible summit between the two leaders are underway, Trump confirmed Wednesday.

The extraordinary meeting between one of Trump’s most trusted emissaries and the authoritarian head of a rogue state was part of an effort to lay the groundwork for direct talks between Trump and Kim about North Korea’s nuclear weapons program.

The clandestine mission came late last month, soon after Pompeo was nominated to be secretary of state. The Pompeo mission was first reported Tuesday by The Washington Post, citing two people with direct knowledge of the trip.

On Wednesday, Trump acknowledged the outreach and said “a good relationship was formed” that could lead to a landmark meeting between the president and Kim.

“Mike Pompeo met with Kim Jong Un in North Korea last week,” Trump tweeted. “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!”

Trump did not give further details of the talks, which took place over Easter weekend, according to the two people who first described the Pompeo trip to The Post. It was unclear why Trump referred to “last week” in his tweet.

“I’m optimistic that the United States government can set the conditions for that appropriately so that the president and the North Korean leader can have that conversation [that] will set us down the course of achieving a diplomatic outcome that America so desperately — America and the world so desperately need,” Pompeo told the Senate Foreign Relations Committee last week during his confirmation hearing.

Speaking at his Mar-a-Lago resort on Tuesday, Trump appeared to allude to the extraordinary face-to-face meeting between Kim and Pompeo when he said the United States has had direct talks with North Korea “at very high levels.” The president didn’t elaborate at the time.

Trump said that he would sit down with Kim probably in early June, if not sooner.

Pompeo has taken the lead on the administration’s negotiations with Pyongyang. His meeting with Kim marks the highest-level contact between the two countries since 2000, when then-Secretary of State Madeleine Albright met with Kim Jong Il, the current leader’s late father, to discuss strategic issues. Then-Director of National Intelligence James R. Clapper Jr. visited the country in 2014 to secure the release of two American captives and met with a lower-level intelligence official.

The CIA declined to comment. Diplomats at the North Korean mission to the United Nations in New York, which is the main conduit for messages between Washington and Pyongyang, declined to comment.

About a week after Pompeo’s trip to North Korea, U.S. officials said that officials there had directly confirmed that Kim was willing to negotiate about potential denuclearization, according to administration officials, a sign that both sides had opened a new communications channel ahead of the summit meeting and that the administration believed North Korea was serious about holding a summit.

“We have had direct talks at very high levels, extremely high levels with North Korea,” Trump said Tuesday during a bilateral meeting with Japanese Prime Minister Shinzo Abe at Mar-a-Lago in Palm Beach, Fla.

The United States has no diplomatic relations with North Korea, but U.S. diplomats have visited and Washington has used several quiet channels to communicate with Pyongyang.

Trump also said he has given his “blessing” to planned discussions between South Korea and North Korea about bringing a formal end to the Korean War, as fast-moving diplomatic developments surrounding nuclear-armed North Korea came into view.

Opening a two-day summit with Abe, Trump took some credit for the rapid developments related to North Korea, whose nuclear and ballistic missile tests his administration has considered the gravest national security threat to the United States.

Trump said that South Korean officials have “been very generous that without us, and without me in particular, I guess, they wouldn’t be discussing anything and the Olympics would have been a failure.” Seoul used the Winter Games, held in PyeongChang in February, as a vehicle to reopen diplomatic talks with Pyongyang.

Hostilities in the Korean War, which involved the United States, ended 65 years ago, but a peace treaty was never signed. A top South Korean official was quoted Tuesday as saying that a formal end to hostilities was on the agenda for the summit between Kim and South Korean President Moon Jae-in next week in the demilitarized zone between the countries.

“They do have my blessing to discuss the end of the war,” Trump said.

Yet such a deal would be complicated and would require direct U.S. participation and agreement. The United States signed the armistice agreement on South Korea’s behalf, and any peace treaty would have to be between the United States and North Korea.

A big part of the reason a peace treaty has never been signed is because Pyongyang has long insisted that if one were attained, U.S. troops would no longer be required in South Korea, a demand the United States has rejected.

Trump’s planned session with Kim, the dynastic leader Trump has mocked as “Little Rocket Man,” comes after the two traded insults and threats last year. Trump vowed to “totally destroy” North Korea if it menaced the United States or its allies, and Kim called Trump senile.

On Tuesday, Trump said the summit with Kim is likely to happen by early June if all goes well. He added a caveat: “It’s possible things won’t go well and we won’t have the meetings, and we’ll just continue to go on this very strong path we have taken.”

Trump later said that five locations are under consideration to host the summit and that a decision would come soon. None of the locations was in the United States, Trump said later, in response to a question from a reporter. Administration officials are said to be looking at potential sites in Asia outside the Korean Peninsula, including Southeast Asia, and in Europe.

Abe appeared delighted with the progress he made with Trump, including a pledge from the U.S. president to raise with Kim the issue of the unresolved cases of at least 13 Japanese citizens abducted by North Korean agents in the 1970s and 1980s — an important domestic issue for Abe.

Trump met with several families of the abductees during a visit to Tokyo in November, and the president was outraged by the death last summer of Otto Warmbier, an American college student who died shortly after being released in a coma from 17 months in captivity in the North. Three Americans remain in captivity, and U.S. officials suggested that their release is likely to be part of talks with Pyongyang.

“This reflects your deep understanding for how Japan cares about this abduction issue. I am very grateful for your commitment,” said Abe, who also pressed Trump to maintain “maximum pressure” on Pyongyang.

Trump and Abe entered their summit hoping to repair a relationship that has been strained by Trump’s decision to meet with Kim, which has alarmed Tokyo, and his move to enact steel and aluminum tariffs without granting Japan a waiver.

In a sign that the two leaders were aiming to re-create their early chemistry, Trump said the two would sneak out for a round of golf Wednesday ahead of additional meetings. The president referred, as he has before, to Mar-a-Lago as the “winter White House.”

Trump aides acknowledged that they are probing the possibility of the United States reentering the 11-nation Trans-Pacific Partnership but emphasized that such a move is premature.

Larry Kudlow, Trump’s chief economic adviser, played down a rift with Japan on trade and said the administration’s tariffs were aimed at punishing China, which he accused of “acting like a Third World economy.” Kudlow declared that a global coalition stands behind the Trump administration’s strategy.

“This trade coalition of the willing that I’ve been talking about, that others have been talking about, is really aimed at China,” he said. “China is a First World economy behaving like a Third World economy. And with respect to technology and other matters, they have to start playing by the rules.”

The United States does not need the TPP to confront Chinese bad behavior, Kudlow said. He touted a strong U.S. economy as leverage for American ideas on trade around the world and said Trump’s tougher stance on Chinese trade has won wide international backing.

“The rest of the world is with us. The president hasn’t consciously sought this, but it’s happening, and it’s a good thing,” Kudlow said. “So I hope China reads that carefully and responds positively.”

China on Tuesday announced temporary anti-dumping measures targeting U.S. sorghum, potentially hitting growers in states such as Kansas and Texas that Trump won in the 2016 election.

The move discouraging imports of U.S. sorghum widens the brewing trade war between Beijing and Washington. On Monday, the United States banned U.S. firms from selling parts to Chinese phone maker ZTE for seven years, as the world’s two largest economies continue to exchange threats of tariffs worth billions of dollars.

But Trump sought to balance his aides’ criticism of Beijing with praise for Chinese President Xi Jinping, whom Trump has pressed to enact economic sanctions on North Korea.

“He’s been incredibly generous,” Trump said. “President Xi has been very strong on the border, much stronger than anyone thought they would be. I’d like them to be stronger on the border, but he’s been at a level nobody ever expected. The goods coming into North Korea have been cut down very substantially.”