NEARLY four decades after the end of a bitter war, North and South Korea reached agreement yesterday on a nonaggression pact, but without settling an issue over the North's nuclear facilities.The historic accord, which came after five sets of talks in 14 months between the two nations' prime ministers, could mark the start of reduced tensions on the heavily militarized Korean peninsula, one of the last remnants of the cold war. Full details of the accord were to be released today, when more talks were scheduled on the nuclear issues that are the most contentious between the two Koreas. The United States claims the North is within a few years of producing a nuclear weapon. Early reports from the talks in Seoul have indicated that the accord includes measures for "confidence building" between the two militaries and the completion of a peace treaty on the armistice that ended the 1950-53 Korean War. North Korea may have dropped its demand for direct talks with the US on a peace treaty, while the South is likely to have conceded its demand for a clause that would prevent the nonaggression accord from influencing its other international treaties. Also, the South may have agreed to suspend joint military exercises next year with US forces. In talks last October, South Korea made a key concession not to link talks on a nonaggression pact with the nuclear issue. And in September, President Bush's announcement that the US was withdrawing its tactical nuclear weapons worldwide led to speculation that the South would soon declare itself free of nuclear weapons. The US and South Korea yesterday proposed mutual inspection of civilian and military nuclear facilities. On Wednesday, the South Korean news service, Yonhap, quoted an unidentified official as saying that South Korea's negotiating position "emphasizes the fact that there are no longer nuclear weapons at the American bases." This may have had a strong effect on the North's recent stance that it would only sign an international agreement on nuclear safeguards if the US began to pull out its alleged nuclear weapons in the South. But doubts remain whether North Korea will continue to also demand that the South declare itself outside the protection of the US nuclear umbrella. THE two Koreas have agreed on little since the war, but global events have worked to isolate the hard-line communist regime of North Korea and to give the South a strong negotiating position. A recent visitor to North Korea, political science Prof. Kent Calder of Princeton University, said officials there say that the nuclear program is "the last card" they have to win some concessions. He also noticed examples of extreme economic hardship and low fuel supplies, especially after Moscow cut off vital subsidies earlier this year. Japan, the US, and other nations have stonewalled North Korea's attempts to normalize relations with them. In recent months, the US has stepped up a diplomatic initiative against the North's nuclear program, including seeking help from the North's sole ally, China, in forcing inspections of the nuclear facilities. US officials have worried that North Korea might make small concessions to the South as a way to convince Japan that it is making peace and thus win economic aid from Tokyo. With such aid the North's economy might survive long enough for a nuclear weapon to be built, the officials fear. But so far, Japan has demanded that North Korea allow inspections of its facilities by the International Atomic Energy Agency. The North signed the nuclear nonproliferation treaty in 1985, but has not signed an inspections accord.