Image copyright Reuters Image caption Mr Feltman met top North Korean officials on his trip including Foreign Minister Ri Yong-ho

A top UN official told senior North Korean figures there was an "urgent need" to keep channels open to avoid the risk of war, the organisation says.

The statement follows a visit to Pyongyang by Jeffrey Feltman, the highest-level trip by a UN official to the isolated nation in six years.

North Korea says it has agreed to regular communication with the UN.

Tensions over the North's weapons programme were raised further after a fresh ballistic missile test last week.

North Korea said it was its most advanced missile yet, capable of reaching the continental US.

The test was the latest in a series of nuclear and missile tests conducted in defiance of UN sanctions.

South Korea and the US have meanwhile been carrying out large-scale military drills in a show of force.

On Sunday, South Korea said it will join the US in imposing fresh sanctions against the North.

Twenty North Korean firms and 12 individuals have reportedly been added to a South Korean blacklist, which will take effect from Monday.

The move by Seoul, its second set of unilateral sanctions in a month, was designed to cut off international sources of funding for North Korea's nuclear missile programme, a foreign ministry official in Seoul said.

The measures are in addition to those imposed by the UN Security Council.

'Hostile US policy'

The UN continues to operate in North Korea, with programmes providing food, agricultural and health aid but the last visit by a senior official was back in 2011.

After the UN's Under-Secretary-General for Political Affairs Mr Feltman met senior North Koreans all agreed "the current situation was the most tense and dangerous peace and security issue in the world today", according to the statement.

"Noting the urgent need to prevent miscalculations and open channels to reduce the risks of conflict, Mr Feltman underlined that the international community, alarmed by escalating tensions, is committed to the achievement of a peaceful solution," it added.

North Korean state media earlier said current tensions were "entirely ascribable to the US hostile policy".

Image copyright AFP Image caption Some of latest pictures released by North Korea showed Kim Jong-un on Mount Paektu, the country's highest peak

But in its reporting of Mr Feltman's trip, KCNA also said both sides agreed on "communication through visits at different level on a regular basis in the future".

Before leaving for Pyongyang, Mr Feltman held talks in China, North Korea's historic ally and main trading partner.

Despite calls from other world leaders for restraint, this year has seen US President Donald Trump and North Korean leader Kim Jong-un hurl insults at each other, both at one time saying the other was mad.

US Secretary of State Rex Tillerson though has said that lines of communication are open between the two sides.

North Korea argues nuclear capabilities are its only deterrent against an outside world seeking to destroy it.