China said Monday the US should not link trade to discussions about North Korea's nuclear programme, after President Donald Trump accused Beijing of failing to restrain Pyongyang despite profiting from business with America.

"We believe that the North Korea nuclear issue and China-US trade are two issues that are in two completely different domains," Vice Minister of Commerce Qian Keming told a press briefing, adding the issues "are not related, and should not be discussed together".

"In general, China-US trade, including mutual investment, is mutually beneficial, and both China and the United States have gained great profits from bilateral trade and investment cooperations," he said.

The comments came in response to a question about tweets from Trump Saturday warning that he would no longer allow China to "do nothing" on North Korea, after Pyongyang launched its second intercontinental ballistic missile test.

Trump, who is at loggerheads with Beijing over how to handle Kim Jong-Un's regime, has repeatedly urged China to rein in its recalcitrant neighbour, but Beijing insists dialogue is the only practical way forward.

In his critique, Trump linked trade woes with the Asian giant to policy on North Korea.

"I am very disappointed in China. Our foolish past leaders have allowed them to make hundreds of billions of dollars a year in trade, yet they do NOTHING for us with North Korea, just talk," Trump wrote.

"We will no longer allow this to continue. China could easily solve this problem!"

A commentary by Beijing's official Xinhua news agency Monday labelled Trump's position as "absurd" and complained that he "still chooses to unfairly blame China" for North Korea's behaviour.

"The crux of the matter is the decades-long animosity between the United States and the Democratic People's Republic of Korea," it said, using the official name for its neighbour.

An editorial in China's Global Times, a state-run nationalistic tabloid, had even sterner words for Trump.

Story continues

"Such a statement could only be made by a greenhorn US president who knows little about the North Korean nuclear issue," it said.

China, Pyongyang's main economic and diplomatic ally, opposes any military intervention and calls for a resolution through dialogue.

The United States has blamed the unbalanced commercial relationship -- marked by a trade deficit with China of $309 billion last year -- on Beijing's policies that impede access to its market.

China says Washington's own rules restricting US high-tech exports are partially to blame.