SEOUL, South Korea — North Korean leader Kim Jong Un and South Korean President Moon Jae-in agreed Friday to finally end a seven-decade war this year, and pursue the "complete denuclearization" of the Korean Peninsula.

The two leaders announced the deal after a historic meeting on their shared border, the first time a North Korean leader has set foot on the southern side. The countries have technically been at war since 1950 and no peace treaty has been signed to replace the 1953 armistice that ended open hostilities.

Kim and Moon said they would hold military talks next month and seek a "phased disarmament," without providing more details. They announced plans to formally declare a resolution to the war and turn the current armistice into a peace treaty by year's end.

The two sides "reaffirmed their mutual goal of a nuclear-free Korean Peninsula through complete denuclearization." "South and North Korea agreed to make efforts to win support and cooperation of the international community for denuclearization of the Korean Peninsula," according to the statement. It didn't elaborate on what that would entail.

Much of the agreement mirrors previous deals between North Korea and Moon's liberal predecessors. It appeared aimed at restoring cooperation that had deteriorated over the past decade.

The agreement follows a rapid thaw of tensions on the peninsula after a flurry of North Korean missile tests and a hydrogen bomb detonation last year. Kim plans to meet U.S. President Donald Trump soon, which would be the first summit between a North Korean leader and a sitting American president.

The question now is whether the commitment will lead to lasting change. Previous agreements have collapsed over inspections, weapons tests and disputes over economic aid.

The stakes remain high, with Kim on the cusp of developing a missile capable of delivering one of his estimated 60 nuclear bombs to any city in the U.S. — a step Trump has threatened war to stop.