President Trump talks during a panel discussion at the Eisenhower Executive Office Building as part of the Generation Next Summit earlier this month. (Jabin Botsford/The Washington Post)

President Trump hailed the “historic meeting” between the leaders of North and South Korea on Friday and said “good things are happening” — but sounded a cautionary note about the thaw in relations between the two countries.

“After a furious year of missile launches and Nuclear testing, a historic meeting between North and South Korea is now taking place,” Trump wrote on Twitter. “Good things are happening, but only time will tell!”

Minutes later, Trump offered a rosier assessment — writing in all capital letters, “KOREAN WAR TO END!” — and seemingly taking some credit for the possible pact announced by North Korean leader Kim Jong Un and South Korean President Moon Jae-in.

“The United States, and all of its GREAT people, should be very proud of what is now taking place in Korea!” the president wrote.

Trump also touted the North-South meeting as he welcomed Olympic athletes to the White House on Friday, noting that developments involving North Korea have moved swiftly. Peace between the two Koreas is now a possibility, Trump added.

“It looks like it could happen,” he said.

Welcoming German Chancellor Angela Merkel to the White House later Friday, Trump said that his own summit with Kim will come soon, adding that potential sites for the meeting have been narrowed to two or three.

Previously, Trump had said five sites were in contention for the meeting, which is planned for late May or early June.

During a joint news conference with Merkel later in the day, Trump declined to answer whether he has had any direct contact with Kim.

“I don’t want to comment on that,” Trump said, but he added that the relationship between the two countries has changed “radically” since a period of “name-calling.”

Over the past year, the two leaders have traded belligerent statements, with Trump mocking Kim as “Little Rocket Man” and pledging to ­“totally destroy” North Korea. Kim, in turn, called the U.S. president a “dotard” and a “lunatic.”

Asked by a reporter Friday whether Kim is manipulating other leaders for his own ends, Trump shook his head.

“I don’t think he’s playing. It’s never gone this far,” he said, referring to past, failed international negotiations with the Kim family.

“Yeah, I agree, the United States has been played beautifully — like a fiddle — because you had a different kind of leader” during those past efforts, Trump added.

During negotiations under the Bill Clinton and George W. Bush administrations, North Korea got “money going in” but did not fulfill its end of the deal, Trump said.

“That’s not happening to us,” Trump said. “We will, I think, come up with a solution. And if we don’t, we leave the room, with great respect but we leave the room, and keep it going.”

In a separate tweet Friday morning, Trump credited Chinese President Xi Jinping with helping the United States pressure North Korea into a more peaceful posture. China is North Korea’s main economic lifeline, and Beijing has backed tighter U.N. sanctions aimed at squeezing Kim’s regime.

“Please do not forget the great help that my good friend, President Xi of China, has given to the United States, particularly at the Border of North Korea,” Trump tweeted. “Without him it would have been a much longer, tougher, process!”

Trump reiterated his gratitude during the afternoon news conference.

Anna Fifield in Goyang, South Korea, and Anne Gearan in Washington contributed to this report.