Image copyright Getty Images Image caption Coal exports to China are a key source of cash for the politically isolated nation

North Korea has lashed out at its only international ally, China, accusing it of giving in to American demands.

Last week, China announced a ban on coal imports during 2017, in response to North Korea's continuing ballistic missile tests.

The statement did not name China, but referred to a "neighbouring country" which "often claims" to be friendly.

"This country, styling itself a big power, is dancing to the tune of the US," the state-run news agency said.

In a direct reference to the ban on imports, the statement said China had "taken inhumane steps such as totally blocking foreign trade", which would help its enemies "to bring down the social system" in North Korea.

The country relies on the coal trade with China for cash income.

Although China backs North Korea, alone among the international community, it has been a critic of its nuclear programme, and has backed UN sanctions against it.

Its ban on coal imports came a week after North Korea tested an intermediate-range ballistic missile, in defiance of UN Security Council resolutions.

The following day, Chinese media reported that a coal shipment from Korea worth $1m (£0.8m) had been stopped at Wenzhou port, on China's eastern coast, before the ban was officially announced a few days later.

Image copyright Getty Images Image caption North Koreans look over coal exports in the border town of Siniuju

North Korea claims to have advanced nuclear capabilities that have never been verified. The country said it created a nuclear weapon in just a few years without any external aid.

If it successfully created a fully functional inter-continental ballistic missile, it could conceivably threaten the United States - about 9,000 km (5,500 miles) away - as well as closer neighbours.

But the government remains defiant in the face of international pressure.

"It is utterly childish to think that [North Korea] would not manufacture nuclear weapons and inter-continental ballistic rockets if a few [pennies] of money is cut off," it said in its statement.

The words "dancing to the tune of the US" may refer to President Donald Trump's remarks, before taking office, that China should bring North Korea "under control".

"China has… total control over North Korea," he said in an interview with Fox and Friends on 4 January.

"And China should solve that problem. And if they don't solve the problem, we should make trade very difficult for China."

The rebuke of its only ally is the second verbal attack on another nation by North Korea on the same day.

Earlier, it appeared to blame Malaysia for the death of Kim Jong-nam, the half-brother of North Korea's leader, and said the country was attempting to politicise the return of his body.

Mr Kim died after being poisoned at Kuala Lumpur airport in an apparent planned attack.