As one of the key individuals who brought the United States and North Korea closer than ever before to a deal on Pyongyang’s nuclear weapons, former U.S. defense chief William Perry has a lot to say about dealing with the regime of Kim Jong Un and a planned landmark summit with President Donald Trump — and what it might mean for Japan.

Perry, who spoke at a forum in Tokyo on Wednesday, voiced cautious optimism about what would be the first-ever talks between a sitting U.S. president and a North Korean leader, but warned that the Trump administration would “do well to learn from the successes and failures of the past” and remember to work closely with American allies as it gears up for the summit.

His comments came the same day Foreign Minister Taro Kono met his South Korean counterpart, Kang Kyung-wha, in Seoul, where Kono stressed the need to “closely coordinate to realize the denuclearization of North Korea.”

Perry, who was secretary of defense under Clinton from 1994 to 1997, is known for his hand in helping craft the 1994 Agreed Framework, which froze Pyongyang’s nuclear program and aimed to normalize U.S.-North Korean relations. But he is perhaps even more highly regarded for his work as a special envoy, which could be said to have brought the Korean Peninsula the closest it has ever been to peace since the end of the 1950-1953 Korean War.

“The first thing I did … was I converted a U.S. initiative into a trilateral initiative,” Perry said about accepting his 1998-1999 role as then-President Bill Clinton’s special envoy to North Korea. “I invited the Japanese prime minister and the South Korean president to create a comparable envoy to work with me.”

Now, nearly two decades on, Pyongyang and Washington are in very different positions, with the North claiming to have “completed” its “state nuclear force” through tests of a powerful thermonuclear bomb and of a long-range missile that experts say could put the U.S. within striking distance.

But while Trump had grappled publicly with the North Korean nuclear issue in his first year in office, effectively returning it to the U.S. spotlight after years on the back burner, Japan’s long held concerns have grown ever more serious as Kim ramped up his nuclear program.

Ahead of the Kim-Trump summit, Prime Minister Shinzo Abe will meet Trump in Washington next week for talks on Tokyo’s key concerns — including the return of Japanese nationals abducted by the North and fears that its short- and medium-range missiles, which can strike Japan, may not be addressed with the North Korean leader.

With the sudden announcement last month of the talks, the mercurial Trump has stoked fears that he could cut a deal with North Korea that leaves Japan in the lurch.

Such a deal could eliminate the threat of intercontinental ballistic missiles that can hit the U.S. but leave Pyongyang with its formidable arsenal of short- and medium-range missiles — and Japan, home to U.S. military bases, with a target on its back.

Perry said he was ashamed that such an agreement remained within the realm of possibility under Trump.

“I must say I am embarrassed for our country, that we only get excited about North Korea’s missiles when they can reach the United States, when they already have missiles that can reach Tokyo, that can reach Seoul, who are our allies. I think that’s an improper emphasis for the United States to make,” Perry said.

Trump might also be able to win a nuclear test ban from Pyongyang, but end up effectively acknowledging the North as a nuclear state — a move Perry said “would be very valuable for everybody, not just the United States,” but which Japan has condemned since it would effectively make denuclearization an even more distant prospect.

Rather than settling for a deal that neglects U.S. alliances, Perry said it was important for the Trump team to focus on what he described as the “overriding issue” for Pyongyang: the normalization of North Korea.

Citing his time negotiating in Pyongyang with the North Koreans, Perry said that “while they were always interested in economic benefits and always willing to pocket them, the ones they were far more interested in were security assurances and building up long-term relations. That is, the normalization of North Korea.”

Asked about concerns over Trump’s volatility and negotiating skills, Perry said that one way of viewing his meeting with Kim was to look at it “as something comparable to what President (Richard) Nixon brought to the negotiations with the Chinese in 1972.”

Trump has strong support among Republicans on the North Korean issue and at least two members of his Cabinet, Perry pointed out, had been some of the biggest critics of earlier attempts at engagement. Now, Perry added, they are on the opposite side.

“So were looking at a ‘Nixon effect’ here,” Perry said. “That is, if against all odds … we’re able to actually negotiate a good agreement, then Trump can get this agreement supported by the U.S. Congress, whereas his predecessors could not have.”