North and South Korea said in a surprise announcement Wednesday that they had agreed in principle to adopt a comprehensive accord aimed at easing four decades of bitter hostility.

The announcement in Pyongyan, the North Korean capital, was the first sign of progress after a series of meetings between the countries' prime ministers, the highest-level talks since Korea's division in 1945.The declaration, however, sidestepped debate earlier in the day over nuclear weapons and the presence of U.S. forces.

The north wants a nuclear weapons ban and a U.S. pullout, while the south accused the north of developing nuclear weapons and demanded that Pyongyang open its research facilities to international inspection.

In separate announcements following the first day of new talks, both sides said they agreed to work toward a single accord encompassing agreements on reconciliation, non-aggression, exchanges and cooperation.

South Korean pool reports from the talks quoted spokesmen from both Communist North Korea led by Kim Il Sung and pro-West South Korea led by President Roh Tae-woo as being cautiously optimistic that a long-term agreement on ending hostilities may be reached.

"The agreement to adopt one single document is significant and reflects forward-looking progress," said Lee Dong-bok, the South Korean spokesman.

A joint working-level committee was appointed to start work immediately and prepare a proposal for a fifth premiers' meeting to be held in Seoul at an unannounced future date, pool reports said.

North Korean spokesman Ahn Byung Su said the acrimonious debate over nuclear weapons and deployment which opened Wednesday's talks should not be allowed to cast a shadow over agreements in other areas.

"Our position is that agreement on denuclearization should be made, but it does not mean that if there is no agreement there also should be no agreement on a non-aggression declaration, exchanges and other cooperation," he said.

At Wednesday's session, Prime Minister Chung Won-shik of the south charged that the Communist north was developing nuclear weapons and demanded that it open its nuclear facilities to international inspection.

Until such matters are settled, he added, "none of your peace proposals can be accepted at face value."

North Korea's Yon Hyong Mok proposed banning the production, possession or introduction of nuclear weapons by either side, pool reports said.

North Korea refuses to allow inspections unless it is allowed to inspect U.S. bases in the South to confirm that U.S. nuclear weapons are being withdrawn.