AP PHOTOS: 3 days of Moon-Kim summit in North Korea

PYONGYANG, North Korea (AP) — South Korean President Moon Jae-in has wrapped up a three-day visit to North Korea for a third summit with leader Kim Jong Un that included wide-ranging agreements they trumpeted as a major step toward peace.

Their main accord on the issue that most worries the world — the North's pursuit of nuclear-tipped missiles that can accurately strike the U.S. mainland — contained a big condition: Kim stated that he would permanently dismantle North Korea's main nuclear facility only if the United States takes unspecified corresponding measures.

Compared to the vague language of their two earlier summits, Kim and Moon seem to have agreed on an ambitious program meant to tackle soaring tensions last year that had many fearing war as the North tested a string of increasingly powerful weapons.

Kim promised to accept international inspectors to monitor the closing of a key missile test site and launch pad and to visit Seoul soon, and both leaders vowed to work together to try to host the Summer Olympics in 2032.