Image copyright Getty Images Image caption Pyongyang has held a series of anti-US rallies

China has told North Korean companies operating in its territory to close down as it implements United Nations sanctions against the reclusive state.

The companies will be shut by early January. Joint Chinese and North Korean ventures will also be forced to close.

China, Pyongyang's only major ally, has already banned textile trade and limited oil exports.

The move is part of an international response to North Korea's sixth and most powerful nuclear test.

The UN Security Council, of which China is a member, voted unanimously for fresh sanctions on 11 September.

China's commerce ministry said it had set a deadline of 120 days from the passing of the resolution for any North Korean companies within its borders to close.

North Korea is politically and economically isolated, and the vast majority of its trade is with China.

Beijing has traditionally been protective of its neighbour, but has sharply criticised its nuclear tests and escalating rhetoric.

Media playback is unsupported on your device Media caption Was your T-shirt made in North Korea?

Earlier this year, it clamped down on its purchase of coal from Pyongyang and on seafood and iron trade across the border.

Coupled with the textile trade ban, North Korea has lost several of its scant sources of foreign currency income.

Beijing has been under public pressure to take action from US President Donald Trump, who has both applauded and denounced Chinese policy at different times.

Mr Trump has also been involved in a direct war of words with North Korean leader Kim Jong-un, labelling him a "rocket man" on "a suicide mission". The US president warned that he would have no choice but to "totally destroy" North Korea if forced to defend the US or its allies.

Mr Kim, in turn, has called Mr Trump "deranged" and a "dotard", and said the US president's comments have convinced him he is right to seek a nuclear deterrent, and has even accused Mr Trump of declaring war.

At a news briefing on Thursday, China's foreign ministry spokesman Lu Kang said: "We are opposed to any war on the Korean peninsula."

"Sanctions and the promoting of talks are both the requirements of the UN Security Council. We should not overemphasise one aspect while ignoring the other."

North Korea's slowly growing economy

Pyongyang does not publish accounts or economic data, which leaves economists guessing over the country's performance. But South Korea's central bank bases its estimates on information from its National Intelligence Service.

It believes that last year, North Korea's economy grew at its fastest pace in 17 years - with GDP up 3.9% despite international economic sanctions. Small shops and markets have been springing up in the capital over the past decade.

But that does not mean ordinary people are doing well. North Korea's economy is geared towards supporting its large military - which analysts believe consumes up to 25% of the country's GDP. Income inequality is rife, with some shops in Pyongyang stocked with all sorts of luxury goods, while other citizens have very little.

Even the latest sanctions have exceptions. China, for example, can still trade oil to its neighbour in limited supply.

Sources: Bank of Korea, Prof Kerry Brown, BBC