* Korean leaders sign declaration at first summit in years* Moon greets Kim at demilitarised zone village of Panmunjom
* Koreas agree to cease "hostile acts," reduce military arms
* Kim due to meet US President Trump in May or June
North Korean leader Kim Jong Un and South Korean President Moon Jae-in embraced after pledging on Friday to work for the "complete denuclearisation of the Korean peninsula," punctuating a day of smiles and handshakes at the first inter-Korean summit in more than a decade.
The two Koreas announced they would work with the United States and China this year to declare an official end to the 1950s Korean war and seek an agreement to establish "permanent" and "solid" peace in its place.
The declaration included promises to pursue phased military arms reduction, cease hostile acts, transform their fortified border into a peace zone, and seek multilateral talks with other countries including the United States.
"The two leaders declare before our people of 80 million and the entire world there will be no more war on the Korean peninsula and a new age of peace has begun," the declaration said.
Earlier, Kim became the first North Korean leader since the 1950-53 Korean War to set foot in South Korea after shaking hands with his counterpart over a concrete kerb marking the border in the heavily fortified demilitarised zone between the countries.
Scenes of Moon and Kim joking and walking together marked a striking contrast to last year's barrage of North Korean missile tests and its largest ever nuclear test that led to sweeping international sanctions and fears of a fresh conflict on the Korean peninsula.
Their dramatic meeting comes weeks before Kim is due to meet US President Donald Trump in what would be the first ever meeting between sitting leaders of the two countries.
Moon agreed to visit Pyongyang later this year, according to the declaration.
South Korean President Moon Jae-in (right) shakes hands with North Korean leader Kim Jong Un at the Peace House at the truce village of Panmunjom on Friday.
As part of efforts to reduce tensions, the two sides agreed to open a liaison office, stop propaganda broadcasts and leaflet drops along the border, and allow Korean families divided by the border to meet. Just days before the summit, Kim said North Korea would suspend nuclear and long-range missile tests and dismantle its only known nuclear test site.
But there was widespread scepticism about whether Kim is ready to abandon the nuclear arsenal his country has defended and developed for decades as what it says is a necessary deterrent against US invasion.
It's not the first time leaders of North and South Korea have declared their hope for peace, and two earlier summits, in Pyongyang in 2000 and 2007, failed to halt the North's weapons programmes or improve relations in a lasting way.
"We will make efforts to create good results by communicating closely, in order to make sure our agreement signed today before the entire world, will not end as just a beginning like previous agreements before today," Kim said after the agreement was signed.
First across the line
Earlier, Moon greeted Kim at the military demarcation line where the men smiled and shook hands.
In an unplanned move, Kim invited Moon to step briefly across into North Korea, before the two leaders crossed back into South Korea holding hands.
"I was excited to meet at this historic place and it is really moving that you came all the way to the demarcation line to greet me in person," Kim said, wearing his customary black Mao suit.
"A new history starts now. An age of peace, from the starting point of history," Kim wrote in Korean in a guest book in the South's Peace House before talks began.
Minutes before Kim entered Peace House, a North Korean security team conducted a sweep for explosives and listening devices, and sprayed what appeared to be disinfectant in the air, on the chairs, and on the guest book.
The two leaders released their joint declaration before attending a dinner hosted by Moon.
During a private meeting in the morning, Kim told Moon he came to the summit to end the history of conflict and joked he was sorry for waking Moon up with his early morning missile tests, the official said.
The United States is hopeful talks will make progress on achieving peace and prosperity, the White House said in a statement as the two men began their summit.
The White House also said it looks forward to continuing discussions with South Korea in preparation for the planned meeting of Trump and Kim in the coming weeks.
Just months ago, Trump and Kim were trading threats and insults as the North made rapid advances in pursuit of nuclear-armed missiles capable of hitting the United States.
Impoverished North Korea and the rich, democratic South are technically still at war because the Korean War ended in a truce, not a peace treaty.
The United States stations 28,500 troops in South Korea as a legacy of the Cold War conflict, which pitted the South, the United States and United Nations forces against the communist North, backed by China and Russia.
Kim and Trump are expected to meet in late May or June, with Trump saying on Thursday he was considering several possible dates and venues.
The latest Korean summit has particular significance not least because of its venue: the Demilitarised Zone, a 260-km long, 4-km wide strip of land created in the 1953 armistice to serve as a buffer between the South and North.