Ilsan, South Korea (CNN) The leaders of North and South Korea have committed themselves to the complete denuclearization of the Korean Peninsula and pledged to bring a formal end to the Korean War , 65 years after hostilities ceased.

In a remarkable day-long summit that weighed heavy with symbolism, South Korean President Moon Jae-in and his North Korean counterpart, Kim Jong Un embraced, planted a tree and talked alone for more than 30 minutes.

Then they signed the Panmunjom Declaration for Peace, Prosperity and Unification on the Korean Peninsula, which commits the two countries to denuclearization and talks to bring a formal end to conflict. It was a startling conclusion to the first meeting between leaders of the two countries in 10 years.

In separate speeches, Kim and Moon promised a new era. Addressing the world's media live on television for the first time, Kim said the Koreas "will be reunited as one country." Moon said: "There will not be any more war on the Korean peninsula."

But behind all the ceremony, at the Panmunjom "peace village" in the Demilitarized Zone (DMZ) that separates North and South Korea, there were few concrete details. The Panmunjom Declaration largely steered clear of specifics regarding Pyongyang's nuclear capabilities, and did not set out what North Korea would expect to get in exchange for denuclearization.

The pledge to end the Korean war faces major hurdles -- any final peace deal must also involve China and the US, both of whom were participants in the original conflict that began in 1950 when the North Korean People's Army invaded the South. Although an armistice was signed in 1953, no formal peace treaty was ever concluded, and technically, the peninsula remains at war.

North Korean leader Kim Jong Un, left, and South Korean President Moon Jae-in shake hands after announcing the Panmunjom Declaration.

US President Donald Trump and most of the US was asleep as the day's events unfolded, but when Washington woke, Trump, who is due to meet Kim later in the coming months, hailed the summit.

He tweeted: "After a furious year of missile launches and nuclear testing, a historic meeting between North and South Korea," he said. "Good things are happening, but only time will tell!" In another tweet, he exclaimed: ""KOREAN WAR TO END!"

Historic day

South Korea had choreographed the meeting of the two leaders down to the second, but it was Kim who delivered the most dramatic moment.

After he crossed the military demarcation line separating North and South Korea to shake hands with Moon, Kim invited him to step into the North. Moon hesitated for the briefest of seconds, before walking into North Korean territory.

South Korean President Moon Jae-in and North Korean leader Kim Jong-un meet at the Military Demarcation Line at the DMZ, April 27.

The image was greeted by gasps, cheers and applause from people watching it on a large screen in central Seoul, and at a conference center in nearby Ilsan, where the South Korean government had set up a sprawling media center for the thousands of journalists invited to watch history being made.

It was also perhaps the only spontaneous moment in what was a carefully scripted affair, which those on the South Korean side had been practicing and rehearsing for weeks.

"President Moon briefly crossed over the MDL to the North," the Blue House said in a statement, referring to the military demarcation line. "This was not a planned event."

The rest of the day went entirely to plan, however. The two leaders appeared acutely aware of the spotlight upon them: Moon maintained an air of calm statesmanship; Kim occasionally appeared to revel in the attention of the world's media. Writing in a visitor's book on entering the Peace House, where discussions took place, Kim wrote "a new history begins now" and "an age of peace, at the starting point of history."

After a morning of meetings with officials, Kim and Moon took part in a symbolic tree-planting ceremony in the DMZ. The tree was from 1953, the year the Korean War armistice was signed. Kim used soil from a mountain on the southern island of Jeju while Moon used earth from Mount Paektu in the north.

Then, the two leaders left their officials behind and struck out side by side through the DMZ to a footbridge that was recently repainted the same blue used on the Korean Unification Flag. Unexpectedly, they talked for 30 minutes, without anyone taking notes and with cameras at a distance. The contents of the conversation have not been disclosed.

The substantive moment of the summit came when Kim and Moon pair signed the agreement that pledged to end the decades of conflict between their two nations, and set them on a path towards denuclearization.

Both leaders agreed to keep in touch by phone, to suspend propaganda broadcasts into each other's country, and to meet again in Pyongyang in the fall.

The day ended with a banquet attended by the two leaders' wives, and a light show and musical performance that concluded with the delegations watching video highlights of the day edited into a showreel projected on a big screen.

Leaders of North and South Korea participate in a tree-planting ceremony next to the Military Demarcation Line that forms the border between the two Koreas.

At their morning meeting, Moon praised Kim's "courageous and bold decision" to agree to talks. "Over the past seven decades we weren't able to communicate, so I think we can talk the whole day today", Moon said, drawing laughs from Kim as the day began.

Jean H Lee, a North Korea expert at the US based Wilson Center, said the images of Kim, in particular, would have great resonance in South Korea.

"For more than a decade, South Koreans have been cut off from North Korea due to tensions," she said in a statement.

"Seeing Kim Jong Un live, chatting easily with their president, will no doubt have been jolt to South Koreans and remind them that the North Koreans are the same people in many ways, in language and shared history if not their political or economic structure."

South Korean President Moon Jae-in, right, toasts Ri Sol Ju, wife of North Korean leader Kim Jong Un at a banquet that concluded the summit.

Pitfalls ahead

While Friday was all smiles and handshakes, there are plenty of potential pitfalls ahead. Under the Panmunjom Declaration, named after the village in the DMZ where the two leaders met, the two parties "confirmed the common goal of realizing, through complete denuclearization, a nuclear-free Korean Peninsula."

What all sides mean by denuclearization has long been a sticking point, especially between North Korea and the US.

"Going into the US-North Korea summit, the key question remains whether North Korea would truly give up its nuclear weapons program," Stratfor Asia Pacific analyst Evan Rees said in a statement.

"The phrasing of the Panmunjom Declaration refers to denuclearization of the peninsula, which could mean movement of US strategic assets, and a phased, rather than a rapid denuclearization -- which goes against what the US has called for."

Earlier in the day, Kim Jong Un said he hoped disagreements would not derail the implementation of the declaration, as has happened with past agreements, hinting he may be aware that a deal is far from being sealed.

China welcomed the outcome of the summit. Foreign Ministry spokesman Lu Kang congratulated both sides and said: We hope all relevant parties keep the momentum of dialogue, work together to promote the denuclearization of the Korean Peninsula as well as the process of a political settlement on the peninsula issue." He said China was willing to "keep playing a positive role to this end."

The White House also welcomed the conclusion of the summit. "We are hopeful that talks will achieve progress toward a future of peace and prosperity for the entire Korean Peninsula," a statement said.

Decades of tension

North of Seoul, along the Freedom Road, which stretches from the city to the Reunification Bridge leading into the demilitarized zone (DMZ), there was a sign of the changing mood: on one side of the highway, yellow and white balloons emblazoned with a blue map of Koreas; on the other, razor wire, guard towers and heavily armed soldiers patrolling the southern bank of the Han River which bisects the still-at-war Peninsula.

While fighting ended 65 years ago, the wounds of war are still very apparent. Families remain split by the conflict, unable to see their relatives on the other side, and some who lost relatives decades ago are still unaware of what fate befell them.

A South Korean weeps watching Kim Jung Un crossing the Military Demarcation Line, on screens in Seoul.

Near the DMZ Thursday, 51 people from the Korean War Veterans Revisit Korea Program had gathered to remember their relatives lost in that conflict and support peace and reunification.

"My father Karle Seydel was killed December 7, 1950 in the Chosun reservoir," Ruth Hebert, who was from San Diego in California, told CNN. His body is believed to be still somewhere inside North Korea.

Hebert said she had spoken with South Koreans who had lost family members in the war and been separated from relatives by the partitioning of the Peninsula.

"We hope and pray that ... this starts to really change," she added. "There's a hope with Japan, with Korea, with the Americans to recover remains. There may be a few (prisoners of war) alive but mostly now it's down to remains."

A formal end to the war will involve more than just the Koreas. Both China and the US, under the flag of the United Nations, were massively involved in the conflict, and would have to be signatories to an eventual peace treaty.