BEIJING - China on Tuesday imposed restrictions on imports of North Korean coal and iron, Beijing’s commerce ministry said, in line with United Nations sanctions on the country following its nuclear and missile tests.

The coal trade between the neighbours was worth $1 billion last year, Chinese Customs figures show, but the announcement allowed for trade to continue if the proceeds were for livelihood purposes.

The move also put in place bans on the import of gold, titanium and rare earth metals from the North, as well as some sales of aviation fuel to it, in line with the UN Security Council measures.

The council approved the measures in March, in the wake of a fourth atomic test by Pyongyang, and Beijing pledged strictly to implement them. But the resolution’s language - concluded after seven weeks of hard negotiations between Washington and Beijing - left significant loopholes for Pyongyang’s key economic supporter to continue business as usual.

China is the North’s main provider of trade and aid and the text allowed for commerce in certain goods, including coal and iron, to carry on as long as the proceeds did not support Pyongyang’s nuclear ambitions.

The UN did not set criteria for making that determination, leaving each country to make its own decision.

The exceptions were mirrored in the text of the statement by China’s commerce ministry, which also provided a letter for companies to sign “solemnly” pledging that their imports of the products were “not related to North Korea’s nuclear programme or ballistic missile programme”.

Aviation fuel sales could also be permitted for humanitarian and some civil aviation purposes.

Trade with China is crucial for the isolated and impoverished North, which has suffered regular food shortages and an outright famine in the mid-1990s.

In 2014 China accounted for more than 90 percent of North Korea’s $7.61 billion in total trade, according to the latest available figures from South Korea’s state-run Korea Trade-Investment Promotion Agency.

Washington has long held that changing North Korea’s behaviour depends on China’s willingness to use its economic leverage.

But Beijing has resisted targeting Pyongyang’s fragile economy for fear of provoking the regime’s collapse, potentially leading to a flood of cross-border refugees and ultimately the prospect of US troops stationed on its border in a reunified Korea.

That stance has become harder and harder to maintain, as Pyongyang has continued to defy both the international community and Beijing’s efforts to restrain it.

In recent weeks North Korea has repeatedly fired projectiles into the East Sea.

The latest fit of pique followed a meeting last week between US President Barack Obama and his Chinese counterpart Xi Jinping, where they agreed to fully implement sanctions against Pyongyang.

The leader was in Washington for a two-day nuclear security summit being hosted by Obama, at which the American president also discussed North Korea’s nuclear threat with Japan and South Korea.

North Korea can mount a nuclear warhead on a medium-range missile, a South Korean official said on Tuesday in a new assessment of the capability of a country that conducted its fourth nuclear test this year.

North Korean leader Kim Jong Un said last month his country had miniaturised nuclear warheads to mount on ballistic missiles. It was his first direct statement of a claim often made in state media though never independently verified.

“We believe they have accomplished miniaturisation of a nuclear warhead to mount it on a Rodong missile,” the South Korean official, with knowledge of South Korea’s assessment of the North’s nuclear programme, told a small group of reporters on condition of anonymity.

The Rodong missile can fire a 1 tonne (1,100 lb) warhead a distance of up to 2,000 km (1,250 miles), the official said. That would put all of South Korea, most of Japan and parts of Russia and China in range.

“We believe they have the ability to mount a nuclear warhead on a Rodong. Whether they will fire it like that is a political decision,” said the official.

There was no direct evidence that the North has successfully mounted a warhead on such a missile, the South Korean official said. He declined to discuss the basis for the change in assessment.

Staunch US ally South Korea has been facing off against its rival to the north for decades.

The South’s conservative president, Park Geun-hye, has reversed a policy of trying to engage the North in dialogue and has instead adopted a hard line against it, particularly since the North conducted its fourth nuclear test on Jan. 6 and a month later launched a long-range rocket putting an object into space orbit.

The test and launch prompted the UN Security Council to impose new sanctions.

South Korea has previously said North Korea had made progress in its efforts to miniaturise a nuclear warhead but the capability was incomplete. South Korea’s Defence Ministry said on Tuesday that assessment remained the military’s position.

Rodong missiles, developed from Soviet-era Scud missiles, make up the bulk of the North’s short- and medium-range missile arsenal with an estimated stockpile of 200.

Experts have predicted that the delivery vehicle for the North’s first nuclear warhead would be the medium-range Rodong missile, rather than an intercontinental ballistic missile (ICBM), which the North has yet to test.

Despite threats to strike the mainland United States, the North is seen as several years away from building an ICBM that can carry a nuclear warhead.

Experts have previously said a functioning mid-range nuclear missile would need the technology to overcome the stress of launch and re-entry and to strike the target with precision, which requires repeated testing.

The North fired a Rodong missile in March. It flew about 800 km (500 miles) into the sea, in the first such launch since two Rodongs were fired in 2014.