North Korean leader Kim Jong Il and South Korean President Roh Moo-hyun signed the agreement after three days of meetings in the North Korean capital, Pyongyang, in only the second-ever such summit between the countries.
The two Koreas "agreed to closely cooperate to end military hostility and ensure peace and easing of tension on the Korean peninsula," according to their statement.
Substantive progress on any peace treaty would require the participation of the U.S. and China, which also fought in the conflict. South Korea never signed the 1953 armistice ending the war.
After both leaders signed the agreement, they shook hands and posed for cameras. Roh then took Kim's right hand in his left and raised both their arms in the air like champion prizefighters before the two shared a champagne toast.
"The South and North shared the view that they should end the current armistice regime and establish a permanent peace regime," the pact said.
They also "agreed to cooperate to push for the issue of declaring the end" of the Korean War by staging a meeting of the "three or four heads of related states."
The United States has already pledged to discuss peace, but insisted that any final settlement would be contingent on Pyongyang's total nuclear disarmament.
The summit ended a day after an agreement between North Korea and the U.S. along with other regional powers at China-hosted arms talks where Pyongyang promised to disable its main nuclear facilities and fully declare its nuclear programs by Dec. 31.
The move would be the biggest step North Korea has taken to scale back its nuclear ambitions after decades seeking to develop the world's deadliest weapons, and U.S. President George W. Bush hailed it as a key for "peace and prosperity" in northeast Asia.
Pyongyang shut down its sole operating reactor at Yongbyon in July after the U.S. reversed its hard-line policy against the regime, the first concrete progress from years of talks that also include China, Japan, Russia and South Korea.
At the North-South summit on Thursday, the two Koreas also said they would hold "frequent" summits, although no timing for any future such encounters was given. Instead, the Koreas scheduled meetings between their defense and prime ministers in the coming months to build on progress from this week's summit.
The Koreas also pledged to boost economic ties, open regular cargo railway service along restored tracks crossing the Demilitarized Zone and create a joint fishing zone on their disputed sea frontier.
They will also open an air corridor between Seoul and North Korea's tallest peak, Mount Paektu, a sacred site to all Koreans that is the origin for the nation in its creation myth.
In an issue deeply emotional to many aging Koreas, the sides also agreed to increase reunions between relatives separated by the border and hold such meetings "constantly." Since the first summit between the Koreas in June 2000, some 18,000 Koreans from separated families have met through face-to-face or video reunions.
Also Thursday, the North and South agreed that a joint cheering squad for the Koreas would travel to next year's Beijing Olympics via train. The countries have sought to field a joint team at international sporting events, but have differed over how athletes would be chosen.