Image copyright AFP

The UN Security Council is preparing a response to North Korea after it test-launched two mid-range missiles, China's UN ambassador Liu Jieyi says.

The two launches on Thursday came after a similar test on 15 April.

Observers say all the tests appear to have failed, but a UN spokesman said such actions, which violate sanctions, were "deeply troubling".

It comes amid a recent ramp-up in weapons activity as the North prepares for a rare party congress.

There are also indications it is planning to carry out its fifth nuclear test, despite condemnation of its last test in January.

In a rare comment on the situation, Chinese President Xi Jinping said China - North Korea's closest ally - was committed to ensuring stability.

He told a meeting of regional foreign ministers in Beijing on Thursday: "As a close neighbour to the (Korean) peninsula, China will never allow war to erupt on the peninsula. Once such a situation occurs, it will do nobody any good."

South Korean officials said the first mid-range missile launch on Thursday took place in the morning near the eastern coastal city of Wonsan but the missile "crashed a few seconds later" in the coastal area, Yonhap news agency reported.

A second test was detected in the evening, but South Korean officials said that too had failed.

Both tests, like the earlier one, are thought to have been of a mid-range missile which has been given the nickname Musudan by observers.

The missile is thought to have a range of about 3,000km (1,800 miles), meaning it could reach Japan or the US territory of Guam.

Japan's ambassador to the UN, Motohide Yoshikawa, said the missile was "a threat to Japan's national security".

Image copyright KCNA Image caption North Korea released a picture on Sunday of an alleged submarine missile test

UN spokesman Stephane Dujarric told a news briefing that such actions by North Korea "are extremely troubling" and said the UN urged Pyongyang to "cease any further provocative actions and return to full compliance of its international obligations".

Strengthened international sanctions were placed on North Korea after it tested what it claimed was a hydrogen bomb and launched a long-range missile.

It also recently claimed to have fired a submarine ballistic missile.

Observers have speculated that Pyongyang is boosting the development of its weapons programs ahead of the Workers Party Congress in May, the first in nearly 40 years.

The North announced this week that the congress would take place on 6 May.

It is aimed at solidifying the power of its leader Kim Jong-un, and will be watched closely for indications of political change and comments on the North's nuclear ambitions.