SEOUL, South Korea — President Moon Jae-in of South Korea said on Sunday that high-ranking officials from North Korea told him their country was willing to start a dialogue with the United States, a potential diplomatic victory for Mr. Moon, who has been urging the two countries to talk.

Kim Yong-chol, a vice chairman of the North’s ruling Workers’ Party, expressed that willingness when he met with Mr. Moon shortly before the closing ceremony of the Winter Olympics in Pyeongchang, South Korea, Mr. Moon’s office said. Mr. Kim led an eight-member North Korean delegation to the ceremony, in the latest sign that the two Koreas were working toward a political détente after years of rising tensions over the North’s nuclear weapons program.

“President Moon noted that North Korea-United States dialogue must take place soon in order to improve South-North Korean relations and to find a fundamental solution to the Korean Peninsula issue,” said Mr. Moon’s spokesman, Kim Eui-kyeom. “To this, the North Korean delegates responded that the North was quite willing to start talks with the United States and agreed that relations between North and South Korea and those between the North and the United States should develop simultaneously.”

But it was too early to take the North’s comments as a major breakthrough.

Mr. Moon’s office did not reveal, for example, whether North Korea had attached any preconditions for starting talks with the United States like the suspension of joint South Korea-United States military exercises, which it calls a rehearsal for invasion. The North threatened the United States with nuclear attacks just a few weeks ago.