President Trump announced Thursday that he will meet North Korean leader Kim Jong Un in Singapore on June 12, locking in a historic, high-stakes summit aimed at curbing the rogue nation’s nuclear weapons program.

Trump made the announcement on Twitter just hours after welcoming home three Americans held captive for more than a year in North Korea during a dramatic overnight visit to meet their plane at Joint Base Andrews outside Washington. The triumphant moment appeared to move Trump to overcome any final hesi­ta­tion about the summit, which has been viewed as a potential reward to an outlaw regime that has brutalized its populace and consistently flouted international laws.

“We will both try to make it a very special moment for World Peace!” Trump wrote in his tweet. At a rally Thursday evening in Elkhart, Ind., Trump called the relationship with Pyongyang “good” and mocked those in the media who had criticized his strategy as too risky.

“You remember everybody in the fake news saying, ‘He’s going to get us into a nuclear war,’ ” Trump said. “And you know what gets you into nuclear war and you know what gets you into other wars? Weakness, weakness.”

Trump said he believed the summit will be a “big success.” But he added that “my attitude is, if it isn’t, it isn’t,” suggesting that he would accept it if there was no deal to be made.

“We’re not going to be walked into an Iran deal where the negotiator, John Kerry, refused to leave the table,” he said, prompting boos from the crowd at the mention of the secretary of state under President Barack Obama who negotiated the multilateral Iran nuclear deal. Trump announced this week that he would withdraw the United States.

But even as Trump projected optimism that the summit, the first between sitting leaders of the two countries, could achieve a breakthrough in the United States’ long antagonistic relationship with North Korea, critics began questioning parts of his strategy, including his sudden detente with Kim. During his trip to Andrews, Trump, who last year ridiculed Kim as “Little Rocket Man,” thanked him for being “excellent to these three” Americans, who were released after spending more than a year each in captivity.

Senate Minority Leader Charles E. Schumer (D-N.Y.) sharply criticized Trump’s remarks about the Americans in a speech on the Senate floor, calling Kim a “dictator” who “robbed them of their freedom.” One of the Americans reportedly asked to get off the U.S. government plane during a refueling stop in Anchorage on the way back from North Korea because he had not seen much daylight during his detention, Vice President Pence said in an interview on “Good Morning America.”

Kim Dong-chul, who had been held in North Korea since October 2015 after being arrested while working in a special economic zone, told reporters at Andrews that he had been sentenced to do hard labor.

The release of the Americans “should not be exalted; it should be expected,” Schumer said. “It is no great accomplishment of Kim Jong Un to do this, and when the president does it, he weakens American foreign policy and puts American citizens at risk around the world.”

Republicans rallied behind Trump, with House Speaker Paul D. Ryan (R-Wis.) calling on lawmakers to give the president “some leeway” in his management of the summit process.

“We’ve watched administrations of both parties not be able to achieve what we had all hoped for in North Korea, and that is a peninsula without nuclear weapons,” Senate Majority Leader Mitch McConnell (R-Ky.) said on Fox News. “So this is as close as we’ve ever come. I think everybody’s a little bit cautious in dealing with the North Koreans for all the obvious reasons, but this is quite significant. We’ve gotten this far, and the president deserves all the credit for getting them in a different position.”

At Andrews early Thursday, Trump cast the cooling of rhetoric as a way to enter the summit on a “new footing.” To a question about Kim’s motivation, Trump said: “I think he did this because I really think he wants to do something and bring that country into the real world. I really believe that.”

Past presidents, including Obama and George W. Bush, were reluctant to meet with North Korean leadership over concerns that a summit would endorse the regime without securing meaningful commitments over denuclearization.

John O. Brennan, who was CIA director in the Obama administration, said he is concerned that Kim is trying to “present an appearance of cooperation” to trick Trump into a summit meeting but will not agree to dismantling his nuclear arsenal.

“I do think that Kim Jong Un, who I despise because of the brutality he has put upon the North Korean people, unfortunately I think he has been masterful in how he has manipulated perceptions and how he has manipulated and quite frankly duped Mr. Trump,” Brennan said Thursday on MSNBC.

Trump had floated other possible locations for the summit. Two weeks ago, the president seemed enamored with the demilitarized zone between North and South Korea, where Kim met last month with South Korean President Moon Jae-in. That dialogue produced remarkable images of the two leaders holding hands while stepping back and forth over the heavily guarded dividing line. Trump ruminated on a “great celebration” to be had if he achieved his own breakthrough with Kim.

But White House aides, cautious about moving too quickly given the complicated, hard-knuckle negotiations to be had over denuclearization, eyed a third-party country. They looked to Europe but focused more heavily on Southeast Asia, hoping to keep the summit close to the region while avoiding countries such as China and Russia that are geopolitical rivals to the United States. Questions over Kim’s willingness to travel long distances also played a role in the planning, officials said.

Singapore, a tiny island nation of 5.6 million that boasts one of the most advanced economies in Southeast Asia, made sense because it maintains diplomatic relations with North Korea, which has an embassy and ambassador in the country. Singapore’s ambassador based in Beijing also is responsible for Pyongyang.

“Singapore is an ideal location for this summit,” said David Adelman, an attorney at Reed Smith who was U.S. ambassador to the nation from 2010 to 2013 under Obama. “Really since its founding, Singapore has carefully cultivated a reputation where East meets West,” he said. “They take great pride in being a friend to all. And they’ve done a great job doing so.”

The country has been the site of other high-profile summits. It plays host to an annual regional security conference called the Shangri-La Dialogue, which usually draws the U.S. defense secretary and top officials from China and other nations. In 2015, Chinese President Xi Jinping and then-Taiwan President Ma Ying-jeou met in Singapore, the first meeting between the leaders of those entities in seven decades.

Some South Korean officials had hoped Trump would choose the demilitarized zone, in part because that would afford Moon a chance to potentially meet with the president quickly after his summit with Kim. Moon is scheduled to visit the White House on May 22 to brief Trump on his own meeting with Kim and discuss strategy ahead of Trump’s summit.

Singapore has enjoyed an increasingly close relationship with the United States. In 2012, the Obama administration agreed to upgrade Singapore to a strategic partner, and the countries signed an enhanced security agreement in 2015. But Singapore also has rigorously sought to maintain good relationships with U.S. rivals, especially China, which has flexed its economic and military muscle as Beijing seeks to expand influence in Southeast Asia.

Lee Kuan Yew, Singapore’s founder, often cautioned that when two elephants fight in the jungle, the grass gets trampled — meaning that small countries must be careful to ensure they maximize their friendships among larger powers.

Trump had pushed countries around the world to cut diplomatic and economic ties to Pyongyang as part of his “maximum pressure” strategy. Singapore has sought to abide by U.N. Security Council sanctions on North Korea, experts said, but its lucrative ports have served as a central shipping hub for North Korean exports.

Trump’s visit to the island nation will come five days after he meets with the leaders of six other world powers — France, Germany, Italy, Britain, Japan and Canada — at the Group of Seven summit in Quebec. That setting offers him another chance to consolidate support for his talks with Kim and will give him another audience with Japanese Prime Minister Shinzo Abe, who remains skeptical about North Korea’s motives.