The North’s Kim Jong-un and Moon Jae-in of South Korea agreed to work to rid the peninsula of nuclear weapons.
The official KCNA news agency hailed this as a “new milestone” in the path to joint prosperity. It also carried the full text of the declaration.
China and the United States both welcomed the news.
However, US President Donald Trump said he would continue to exert maximum pressure on North Korea, as he prepares to meet Mr Kim in the coming weeks.
“We’re not going to be played, OK?” he said.
“We’re going to hopefully make a deal.”
After the talks at the border, Mr Kim and Mr Moon also agreed to push towards turning the armistice, which ended the Korean War in 1953, into a peace treaty this year.
The summit came just months after warlike rhetoric from North Korea.
What is in the agreement?
Details of how denuclearisation would be achieved were not made clear, and many analysts remain sceptical about the North’s apparent enthusiasm for engagement.
An issue for the North is the security guarantee extended by the US, a nuclear power, to South Korea and Japan and its military presence in both countries.
Will historic Koreas summit lead to peace?
Previous inter-Korean agreements have included similar pledges but were later abandoned after the North resorted to nuclear and missile tests and the South elected more conservative presidents.
Mr Kim said the two leaders had agreed to work to prevent a repeat of the region’s “unfortunate history” in which progress had “fizzled out”.
“There may be backlash, hardship and frustration,” he said, adding: “A victory cannot be achieved without pain.”
Other points the leaders agreed on in a joint statement were:
An end to “hostile activities” between the two nations
Changing the demilitarised zone (DMZ) that divides the country into a “peace zone” by ceasing propaganda broadcasts
An arms reduction in the region pending the easing of military tension
To push for four-way talks involving the US and China
Organising a reunion of families left divided by the war
Connecting and modernising railways and roads across the border
Further joint participation in sporting events, including this year’s Asian Games
The commitment to denuclearisation does not explicitly refer to North Korea halting its nuclear activities but rather to the aim of “a nuclear-free Korean peninsula”.
What did China and the US say?
China later praised the political determination and courage of both leaders and said it hoped the momentum could be maintained.
President Trump also welcomed the news, tweeting that “good things are happening”.
Speaking in Washington, Mr Trump said his expected meeting with Mr Kim would take place in one of two countries under consideration and vowed he would not be “played” by the North Korean leader.
“We will come up with a solution and if we don’t we’ll leave the room,” he said.
How did Friday’s summit unfold?
The leaders were met by an honour guard in traditional costume on the South Korean side. The pair walked to the Peace House in Panmunjom, a military compound in the DMZ.
Mr Kim then invited the South Korean president to step briefly across the demarcation line into North Korea, before the pair stepped back into South Korea – all the while holding hands.
It was an apparently unscripted moment during a highly choreographed sequence of events.
The two leaders spoke together during a session broadcast live on South Korean TV.
Mr Kim jokingly apologised to Mr Moon for repeatedly forcing him to get up early because of the North’s missile and nuclear tests.
“I heard you [President Moon] had your early morning sleep disturbed many times to attend National Security Council meetings,” he said. “I will make sure that your morning sleep won’t be disturbed.”
“Now I can sleep in peace,” Mr Moon replied.
Mr Kim also acknowledged that the North’s infrastructure lagged behind that of the South.
“I’m worried that our transport situation is bad so it may discomfort you, it may be embarrassing [for me] if you visit North Korea after living in the South’s environment,” he said.
After separating for lunch, the two leaders took part in a tree-planting ceremony using soil and water from both countries.
They later attended a banquet.
Mr Kim was accompanied for the symbolic discussions by nine officials, including his powerful sister, Kim Yo-jong.>