North Korea's Foreign Minister Ri Yong-Ho shakes hands with with Jeffrey Feltman: Reuters
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.
'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".
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.