Nearly seven decades after open hostilities began on the Korean Peninsula, the war that sharply divided one country into two is finally ending. The leaders of North and South Korea on Friday came together in the border village of Panmunjom to pledge a formal end to the Korean War.

The agreement arose from a long-planned and meticulously rehearsed summit between South Korean President Moon Jae-in and North Korean leader Kim Jong-un. There had been speculation in early April about a possible peace treaty and a joint statement from the two governments.

A full statement from both governments provided a roadmap for the Korean peace process. It officially declared an end to the war on the peninsula, with a legitimate peace treaty to be signed later this year. Families on opposite sides of the heavily guarded border will be reunited, roads will be connected and Moon will visit the North Korean capital of Pyongyang in 2018.

korea The leaders of North and South Korea agreed to formally end the Korean War. North Korea's leader Kim Jong Un (R) and South Korea's President Moon Jae-in (L) walk together after a tree-planting ceremony at the truce village of Panmunjom on April 27, 2018. Photo: KOREA SUMMIT PRESS POOL/AFP/Getty Images

The agreement calls for a complete denuclearize of the Korean Peninsula. That will, in all likelihood, take some time and be carried out in phases. The two leaders also agreed to hold regular phone conversations with each other.

“The two leaders solemnly declared before the 80 million Korean people and the whole world that there will be no more war on the Korean Peninsula and thus a new era of peace has begun,” the statement read.

Kim and Moon even shook hands at the demarcation line of the DMZ along the North and South Korean border. Kim symbolically stepped across the border into South Korea, before Moon spontaneously did the same in the other direction. 

The peace process may have some complications when it comes time to sign the treaty. China and the U.S. both fought on opposite sides of the Korean War before its 1953 ceasefire, meaning they will need to agree to the treaty’s terms and sign it, too, according to CNN.

President Donald Trump, whose administration has provided conflicting statements about North Korea, will meet with Kim later this year.