Media playback is unsupported on your device Media caption Kim Jong-un welcomes South Korean officials

North Korea is willing to talk about getting rid of its nuclear weapons but only if its own safety can be guaranteed, South Korea says.

The South says the subject was raised when its officials met with the North's leader, Kim Jong-un, in Pyongyang on Monday, during a rare visit.

They said Mr Kim is also open to US talks, and would pause weapons testing.

In previous programmes to halt its nuclear ambitions, the North has failed to keep its promises.

The leaders of North and South Korea have also agreed to meet at a summit next month, Seoul's envoy says.

It will be the first such meeting for more than a decade and the first since Kim Jong-un took power in North Korea.

Mr Kim and South Korean President Moon Jae-in will meet on the heavily fortified border next month, at the truce village of Panmunjom. The countries also agreed to open a hotline between the leaders.

Throughout February's Winter Olympics in South Korea, the two countries struck a friendly tone, sending athletes to compete in a joint team and holding talks.

But the US maintained that North Korean gestures of rapprochement would carry little weight without a commitment on nuclear weapons - particularly following last year's nuclear and missile tests carried out by the North.

The South Korean delegation is expected to visit Washington later this week to brief US officials on their talks in the North.

What is North Korea reported to have said?

A statement from the South Korea president's office said: "The North showed willingness on denuclearisation in the Korean Peninsula. If military threats to the North Korea decrease and regime safety is guaranteed, the North showed that it has no reason to retain nukes."

Image copyright Reuters Image caption Kim Jong-un was pictured welcoming delegates from the South to a dinner on Monday

The North's KCNA news agency said Mr Kim had "warmly welcomed" the delegates and held an "openhearted talk" with them.

It said the dinner took place "in a warm atmosphere overflowing with compatriotic feelings".

However, some critics have suspicions over North Korea's intentions. In the past, they have failed to follow through on deals, notably an aid-for-disarmament agreement in 2005.

Where does the US stand?

The United States has said it will only go in to formal talks with North Korea if Pyongyang is ready to give up its nuclear weapons.

After the news from the South Korean officials was made public, President Donald Trump tweeted: "The World is watching and waiting!"

"May be false hope, but the U.S. is ready to go hard in either direction!"

Vice-President Mike Pence added: "All options are on the table and our posture toward the regime will not change until we see credible, verifiable, and concrete steps toward denuclearization."

Meanwhile, China's foreign ministry said it hopes the Koreas can continue with efforts to advance reconciliation, Reuters news agency reported.

What next?

Analysis by Jonathan Marcus, BBC defence correspondent

This is, of course, South Korea's take on what North Korea is offering.

Some of the suggestions are, at face value, encouraging - not least North Korea's apparent willingness to discuss the denuclearisation of the Korean peninsula. However, its conditions - that the military threat to North Korea is reduced and regime safety is guaranteed - raise all sorts of questions.

The North also says that it is willing to talk to the US with the goal of normalising relations with Washington.

The most positive element is the most immediate; that the period of calm initiated by the Winter Olympics looks set to continue.

"While the dialogues continue," the South says, "the North will not conduct any nuclear tests, missile launches or other provocations." (Surely not Pyongyang's words!)

The two Koreas appear willing to create diplomatic space to try to improve relations across the board. Much will now depend upon how Washington reacts.

What happened at the Pyongyang dinner?

South Korean officials had a four-hour dinner with Kim Jong-un on Monday. Among the delegation were intelligence chief Suh Hoon and National Security Adviser Chung Eui-yong.

Pictures showed Mr Kim and visitors from the South smiling broadly around a dinner table.

Also present was Mr Kim's wife, Ri Sol-ju, who rarely appears at official events, and his sister Kim Yo-jong, who was part of a North Korean delegation to the Pyeongchang Olympics.

The two sides appear to be aiming to capitalise on the reduced tensions after the Games, which saw the Koreas march together under one flag.

Image copyright Getty Images

During their visit, the South's officials also held a boardroom meeting and passed on a letter from South Korean President Moon Jae-in, in which he invited Mr Kim to attend further talks.

KCNA said Mr Kim had "exchanged views and made a satisfactory agreement" on the letter and gave orders for it to be acted on.

The South's delegates returned to Seoul on Tuesday morning, the South Korean news agency Yonhap said.

Has this ever happened before?

These were the first officials from Seoul to meet Mr Kim since he came to power.

Kim Jong-un has met very few foreign officials since he became leader in 2011 and the last time envoys from the South visited Pyongyang was in 2007.

Two previous summits were held in 2000 and 2007, under South Korean presidents Kim Dae-jung and Roh Moo-hyun who met Kim's father, Kim Jong-il.

The South's officials have stressed the talks were only preliminary, but the parties had "somewhat shared" views on some issues.