North and South Korea on Tuesday held their first official dialogue in more than two years, and agreed on negotiations to resolve problems and avert accidental conflict.

In a joint statement after the 11-hour talks, the North pledged to send a large delegation to next month's Pyeongchang Winter Olympics in the South, but made a "strong complaint" after Seoul proposed talks to denuclearize the Korean peninsula.

"All our weapons including atomic bombs, hydrogen bombs and ballistic missiles are only aimed at the United States, not our brethren, nor China and Russia," said Ri Son Gwon, Pyongyang's chief negotiator.

"This is not a matter between North and South Korea, and to bring up this issue would cause negative consequences and risks turning all of today's good achievement into nothing," Ri, chairman of the North's Committee for the Peaceful Reunification of the Fatherland, warned in closing remarks.

South Korea Koreas Tensions

The head of the North Korean delegation, Ri Son-gwon, centre, arrives at the South side for the meeting with South Korea at Panmunjom in the Demilitarized Zone in Paju, South Korea, on Tuesday. (Yonhap via Associated Press)

South Korea asked its neighbour to halt hostile acts that stoke tension on the peninsula, and in return, the North agreed that peace should be guaranteed in the region, the South's unification ministry said in a separate statement.

The talks had been closely watched by world leaders keen for any sign of a reduction in tension, as fears grow over the North's missile launches and development of nuclear weapons, in defiance of United Nations Security Council resolutions.

Earlier on Tuesday, Seoul said it was prepared to lift some sanctions temporarily so North Korean officials could visit the South for the Games. The North said its delegation would comprise athletes, high-ranking officials, a cheering squad, art performers as well as reporters and spectators.

South Korea has unilaterally banned several North Korean officials from entry in response to Pyongyang's ramped-up missile and nuclear tests, held despite international pressure.

However, some South Korean officials have said they see the Olympics as a possible opportunity for easing tension.

Foreign Ministry spokesperson Roh Kyu-deok said Seoul would consider whether it needed to take "prior steps," together with the UN Security Council and other relevant countries, to help the North Koreans visit for the Olympics.

Working talks will be held soon to work out the details of bringing the North Koreans to the Olympics, the statement said, with the exact schedule to be decided via documented exchanges.

UN Secretary General Antonio Guterres welcomed the progress made in the talks, particularly the agreement to hold military-to-military talks, calling this "critical to lowering the risk of miscalculation."

He also welcomed North Korea's decision to send a delegation to the Olympics and said he hoped for the resumption of dialogue leading to denuclearization.

Military hotline restored

At Tuesday's talks, the first since December 2015, Seoul proposed inter-Korean military discussions to reduce tension on the peninsula and a reunion of family members in time for February's Lunar New Year holiday, but the joint statement made no mention of the reunions.

The North has finished technical work to restore a military hotline with South Korea, Seoul said, with normal communications set to resume on Wednesday. It was not immediately clear what information would be transferred along the hotline.

South Korea Koreas Tensions

A South Korean government official checks the direct communications hotline to talk with the North Korean side at the border village of Panmunjom in Paju, South Korea, on Jan. 3. (Yonhap via Associated Press)

The North cut communications in February 2016, following the South's decision to shut down a jointly run industrial park in the North.

North Korea also responded "positively" to the South's proposal for athletes from both sides to march together at the Games' opening ceremony and other joint activities during the Winter Olympics, Seoul said.

Athletes of the two sides have not paraded together at international sports events since the 2007 Asian Winter Games in China, after relations chilled under nearly a decade of conservative rule in the South.

The United States, which has 28,500 troops stationed in South Korea as a legacy of the 1950-1953 Korean War, initially responded coolly to the idea of inter-Korean meetings, but U.S. President Donald Trump later called them "a good thing."

Trump has said he would like to see talks go beyond the Olympics.

"At the appropriate time, we'll get involved," he said.

The U.S. State Department said Washington would be interested in joining future talks, but stuck to its insistence they must be aimed at denuclearization, something North Korea rejects, showing that a diplomatic breakthrough remains far off.

On Tuesday, China's foreign ministry said it was happy to see talks between North and South Korea and welcomed all positive steps.

Russia echoed the sentiment, with a Kremlin spokesperson saying: "This is exactly the kind of dialogue that we said was necessary."