China is to stop importing coal, iron ore, seafood and other goods from North Korea in a matter of weeks, as it brings its operations in line with sanctions imposed by the United Nations following the development of Kim Jong-un’s nuclear and missile programmes.

China is North Korea’s main trading partner but it last week supported the UN Security Council ban. The Chinese customs agency has said it will stop processing imports of coal, iron and lead ores, and seafood from the country at midnight on 5 September.

Any cargo already on its way to China will be cleared as usual by customs ahead of the sanction deadline, the Chinese government said.

The UN Security Council voted unanimously to impose new sanctions on Pyongyang last week, in what the US Ambassador to the UN called “the single largest economic package ever levelled against the North Korean regime”.

The sanctions, which include banning $1bn (£771m) in exports, have been levied in response to Pyongyang’s nuclear programme and its testing of two intercontinental ballistic missiles last month.

North Korea has infuriated China, its closest ally, by continuing to test its nuclear and missile capabilities, causing Beijing to agree to the tough sanctions from the UN.

Tensions have escalated between Washington DC and Pyongyang in the past week, with Donald Trump warning Mr Kim that he “will truly regret it” if he attacks the Pacific island of Guam or any other US territory. It follows his comments that the US is “locked and loaded” and ready to unleash “fire and fury” if Pyongyang continued in its threats.

What are the ranges of North Korea's missiles?

The strategically important US island of Guam has been at the centre of tensions since the launch of the ballistic missiles. An intelligence report has suggested that North Korea has managed to miniaturise its nuclear weapons to fit within one of its missiles, while its government has claimed its missiles now have the range to reach US territory.

Despite the tough sanctions imposed on North Korea, the US is said to be preparing military options in case the UN-imposed penalties fail.

General Joseph Dunford, the highest-ranking military officer in the US armed forces, said that while the US wants to peacefully resolve the escalating situation with North Korea, it is ready to use the “full range” of its military capabilities in case of provocation.

General Dunford is the Chairman of the Joint Chiefs of Staff and made the comments while on a visit to South Korea, Japan and China.

South Korea’s president Moon Jae-in called for a peaceful solution, urging General Dunford for America to find a diplomatic solution to the heightened situation.

The president said “there must not be another war on the Korean Peninsula,” according to his office.