WASHINGTON — President Donald Trump threw plans for next month’s historic summit with North Korea into greater uncertainty Tuesday even as he met at the White House with South Korea’s President Moon Jae-in to try to keep the diplomatic breakthrough on track.

“It may not work out for June 12,” he told reporters at one point, then further confused the question by adding, “There’s a good chance that we’ll have the meeting.”

Trump refused to fully commit to the session in Singapore with North Korean leader Kim Jong Un, vowing to attend only if U.S. conditions are met. North Korean denuclearization, the president said, “must take place,” but he stopped short of demanding that Kim end his nuclear weapons program all at once.

“All-in-one would be nice,” Trump said. “Does it have to be? I’m not sure I want to totally commit myself.”

Moon, who is deeply invested in peace talks and eager to see the Trump-Kim summit occur, sat mostly quietly beside Trump as the U.S. president answered reporters’ questions, often without allowing the interpreter seated just behind his armchair to translate for Moon.

During Moon’s own brief remarks amid the prolonged back-and-forth between Trump and reporters, he lavished praise on Trump — as he has in past meetings — for helping steer North and South Korea closer to a possible peace agreement.

“Thanks to your vision of achieving peace through strength, and your strong leadership,” Moon said through a translator, “ ... we find ourselves standing one step closer to the dream of achieving the complete denuclearization of the Korean Peninsula and world peace.”

Trump was less outwardly optimistic. “We’ll see what happens,” Trump said. “Whether or not it happens, you’ll be knowing pretty soon.”

The exchange underscored the volatility of planning the first meeting of a sitting U.S. president with a ruler of North Korea, especially when both leaders are as unpredictable as Trump and Kim. Hours after Trump met with Moon, Secretary of State Mike Pompeo made an unexpected appearance before reporters at the State Department, apparently to deliver a more reassuring message about the summit. He said he remains optimistic it will take place as scheduled.

“We are doing all we can to make it historic and successful,” he said, adding — and repeating for emphasis — “We are still working toward June 12.”

“I’m optimistic,” added Pompeo, who twice met with Kim in Pyongyang, this month and last, to set the stage. “This could be something that comes right to the end and doesn’t happen,” he acknowledged. Yet, having set a date and location, “we are driving on.”

Earlier at the White House, Moon sought to counter the “many skeptical views within the United States” about whether the summit can succeed, or North Korea will keep any commitments, based on past failures.

“I don’t think there will be positive developments in history if we just assume that because it all failed in the past, it will fail again,” Moon said.

Hours earlier, South Korea’s top national security adviser had professed “99.9 percent” confidence that the summit would take place as planned. It is not immediately clear whether the scheduled summit itself is truly in doubt, or the president, who had expressed such excitement about the historic meeting that aides warned him about appearing over-eager, is merely trying to improve his own leverage heading into it.

Trump also put the onus on North Korea to come to the table. Describing his administration’s recent period of dialogue with North Korea as “a good experience,” the president who once threatened the country with “fire and fury” urged Kim to “seize the opportunity.”

After suggesting weeks ago that “everyone thinks” he should win the Nobel Peace Prize for his diplomatic efforts with North Korea, Trump has wavered in recent days as North Korea has renewed a hard line against demands that it forfeit its nuclear arsenal.

Momentum for the summit slowed last week after North Korea’s chief nuclear negotiator stated that the country would never give up its nuclear weapons program in exchange for relief from economic sanctions, and officials canceled a meeting with South Korea. Subsequently, the North also expressed doubt about the meeting with Trump.

That prompted a newly wary Trump to call Moon, who had privately assured him about the North Koreans’ willingness to negotiate, on Saturday night.

North Korea’s truculent statement came in response to an interview in which John Bolton, Trump’s new national security adviser, cited Libya as a model for disarmament — a parallel that unnerved and angered Kim. Libya agreed to give up its nuclear weapons program in 2003, but the promise of economic integration with the West failed to materialize and the leader who agreed to the deal, Moammar Gadhafi, was overthrown and killed by Western-backed rebels in 2011.

Trump quickly attempted to distance himself from Bolton’s remarks, which appeared to undercut the diplomatic table-setting done by Pompeo in his two meetings with Kim, one of which secured the release of three U.S. citizens being held prisoner by Kim’s regime.

In the Oval Office on Tuesday, Trump suggested that China, not his own adviser, might be to blame for North Korea’s apparent hardening its attitude about brokering a deal. Recently, Kim twice visited China and met with the country’s leaders.

“I think there was a little change in attitude from Kim Jong Un. I don’t like that,” Trump said. “There was a difference when (Kim) left China a second time.”

Moon, who met with Kim at the demilitarized zone separating North and South Korea last month, is committed to ending the decadeslong stalemate between the divided nations. His visit to Washington is largely an effort to reassure Trump and keep plans for the summit on track.

“The stakes are high for President Moon because he really needs a Trump-Kim summit to happen, and progress on the nuclear issue between the U.S. and North Korea diplomatically, in order for him to drive and fully achieve his peace agenda — even if the summit gets postponed,” said Duveon Kim, a visiting senior fellow at the Korean Peninsula Future Forum in Seoul.

Before reporters were finally ushered out of the Oval Office, Trump expressed bland optimism about eventually making progress.

“In the end it will work out,” he said. “I can’t tell you exactly how or why, but it always does.”