Seoul expected to avoid pressing North on human rights and nuclear weapons.
Under the declaration, the two leaders also pledged to create a joint fishing zone along their disputed sea border – a frequent source of tensions between the North and South.
North Korea has never recognised the sea border, which was drawn unilaterally by United Nations forces after the Korean War.
Just hours before the declaration was signed, news came from Beijing that North Korea had agreed to a six-nation plan to dismantle all its nuclear facilities by the end of this year.
In a nod to the nuclear deal, the two leaders agreed to make joint efforts to ensure the plan is implemented smoothly – the first time Kim has personally put his name to denuclearisation efforts.
In other points, the two leaders also agreed they would hold “frequent” future summits – although no timing for any such encounters was given – and they agreed to increase cross-border family reunions, saying they would hold such meetings “constantly”.
The issue of divided families is a deeply emotional one in both countries.
Kim, in his usual khaki jumpsuit, and Roh shook hands, smiled and clinked glasses of champagne after signing the agreement.
Brink of war
North and South Korea have stood on the brink of a return to war for more than five decades, ever since the Korean War was brought to a halt with a ceasefire in 1953.
|Korean declaration: Key points|
Work to sign peace treaty along with the US and China to formally end Korean War
Cooperate to end military hostilities and ensure peace
Establish common fishing zone around disputed western sea border.
Ensure international agreements on North Korea‘s nuclear weapons programmes are fully implemented
Promote economic co-operation, including establishing cross-border rail freight service and building cooperative ship-building complexes
Open an air route from South Korea to culturally significant Mount Paektu
Send joint “cheering squads” to the 2008 Beijing Olympics
Expand reunions of separated families
In the declaration signed in Pyongyang, Roh and Kim agreed that a more formal end to hostilities must be put in place.
“North and South Korea shared the view they must end the current armistice and build a permanent peace regime,” they said.
The two leaders also said that both sides had “agreed to closely co-operate to end military hostility and ensure peace and easing of tension on the Korean peninsula”.
However, while an agreement to push for a formal end to the war is a significant step forward, any actual treaty will also have to include China and the US, both of which fought in the Korean War.
The US still has some 50,000 troops based in South Korea.
As for South Korea itself, it was never a signatory to the original armistice.
Question of trust
Interviewed by Al Jazeera, Brian Bridges, a professor of political science at Lingnan University, Hong Kong, said: “North Korea is in a difficult economic situation … and Kim Jong-il has to face the reality of how to get aid, how to get foreign investment into his country to raise the living standards of his people.
“To do that it requires dialogue and engagement and giving up some of the nuclear weapons or nuclear processes that he has been involved so far.
“He has become slightly more realistic about what can be achieved. … He is becoming much more attuned to international opinion and maybe he is coming out of his shell and becoming much more engaged.”
Melissa Chan, Al Jazeera’s correspondent in South Korea, said that while the declaration does include some concrete steps, it is unlikely to silence all of Roh’s critics at home in South Korea, many of whom say the North cannot be trusted to keep its word.
She said that the first inter-Korean summit in 2000 produced a joint declaration saying the two sides should would meet more regularly and work towards re-unification – but it took seven years before another summit took place.
South Korea’s main opposition Grand National Party called the declaration “insufficient”.
In a statement the party, which is preparing for presidential elections early next year, said it was “very regrettable” that the two leaders didn’t take any “substantial measures or show their firm commitment to nuclear dismantlement and peace on the Korean peninsula”.
The three-day summit began on a somewhat chilly note on Tuesday, with Kim welcoming his visitor to Pyongyang, then disappearing after exchanging barely a few words.
However, the two leaders appeared to warm to each other on as they began formal talks on Wednesday, and in the evening Roh attended a performance of North Korea‘s mass games.
Roh is due to travel back to South Korea later on Thursday, returning by road across the heavily fortified border zone.
On his way back he is expected to stop in the North Korean border city of Kaesong, for a visit to a special economic zone run by both Koreas.
The zone, located 10km inside North Korea, has direct road and rail access to South Korea and was one of the tangible achievements from the first inter-Korean summit in June 2000.